|
|
 |
| Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Professional section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

October 15th, 2003, 01:43 PM
|
|
Registered User
|
|
Join Date: Oct 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Accessing Server Side Data on Client Side
How do you access data gathered on the server side (by any means, whether it be from a database, or other means) from the client side?
Especially within event handlers on the client side? I would think this would be a very desireble need, yet I can't find anything on it
specifically. Maybe you can't.
My knowledge at this point is access as far as Session variables, application variables, page and function scope.
Here is an excellent example: you query data from a database, obviously on the server side. Now, how would you access this data on the client side. I am leaving this as a very broad question on purpose.
|

October 15th, 2003, 02:40 PM
|
 |
Friend of Wrox
Points: 16,368, Level: 55 |
|
|
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
You can't access anything from the client to the server apart from requesting a page if you are using only the browser. You need to pass everything you expect to need to the client by means of HTML: hidden form elements, javascript variables/arrays, etc. Then when you have client side events, you can have javascript access that data.
Alternatively you can use ActiveX objects or Java applets that get downloaded to and run at the broser.
If you want to do something more fancy within the browser alone, you could build a frameset with a hidden frame and use that frame as a "talker" to the server. You can force posts or gets thru that frame, then the frame returns with javascript that provides data and the actions necessary for the event you called (populating HTML controls etc). This would make more of an application feel to a web page.
Session/application/page/function vars are all only within the scope of the server-side application. And remember that once the server is done processing one ASP, it's gone. And thus is the bane of the ASP programmers existence: the statelessness of the web.
Peter
|

October 15th, 2003, 03:19 PM
|
|
Registered User
|
|
Join Date: Oct 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks, I see what you are saying, that has been the most helpful response thus far. I like the idea about frames, I am still learning web developement and have not fully covered frames and dynamic html. My primary skills are in C++ and algorithm development and I was thinking is more along those lines.
|

October 15th, 2003, 03:33 PM
|
 |
Friend of Wrox
Points: 16,368, Level: 55 |
|
|
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Do some background reading on ASP so you can get familiar with the whole statelessness issue of web applications. When you have been writing desktop software it can be very hard to come to grips with the disconnected nature of a web app. There are plenty of intro and beginning books in the wrox/wiley/apress libraries that explain it. If you haven't yet gotten into ASP yet, you might concider starting with ASP.Net. Paticularly because you could jumpt right into the C# language (versus dealing with VBScript in ASP) and could cover one hurdle pretty quick.
Good luck!
Peter
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |