Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Passing variables between server & client scripts

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-07-04, 11:53
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
Passing variables between server & client scripts

How do you pass variables generated/updated in server-side VBSscript to client-side VBScript? I know how to do this for HTML, but don't know how to do this for client-side VBS.

Or to better fit my need here: If I used a server-side VBS code to execute a query and have Recordsets returned, how do I make use of this recordset using client-side VBS codes?

Thanks.

Last edited by rweide : 10-07-04 at 12:12.
Reply With Quote
  #2 (permalink)  
Old 10-07-04, 14:30
DMWCincy DMWCincy is offline
Registered User
 
Join Date: May 2004
Posts: 125
What are you trying to do on the client side that you can not do on the server side with the data?

The most I usually do if I have to use stuff in the client side code is something along of the lines:

<script>
dim clientsidevariable = <%=Value_from_serverside%>
</script>

Not the best if you have to generate alot of values from server side but for a small amount that would work.

HTH
Reply With Quote
  #3 (permalink)  
Old 10-07-04, 14:59
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
Unhappy

This is an intranet SQL query generation application.

I use server-side scripts to read and place server data on several list boxes (mainly server-side scripts up to this point), then users make selections from these list boxes, during this user interface time, I stay on the client side to process the interaction between my page and user entries, since this is all between end-user and whatever is dsiplayed on screen (this part is client-side).

After they hit 'submit' button, I use data users entered to create SQL query and to retrieve recordsets, and display both the SQL query created and the recordsets on the next page, possibly displaying the data on a spreadsheet.

At this point, I need to be able to access the SQL query string created or the recordsets returned to place the data on the screen. Since the data is large and other function is needed, I may choose to use the spreadsheet for the display.

Can I use server-side scripts for all this? Maybe, but I'm not sure yet. It just makes sense for me to process this on the client side using <script> </script>, instead of ASP's <% %>.

Last edited by rweide : 10-07-04 at 15:03.
Reply With Quote
  #4 (permalink)  
Old 10-07-04, 15:54
DMWCincy DMWCincy is offline
Registered User
 
Join Date: May 2004
Posts: 125
The only reason I can think of that I really transfer data between server side and client side is if I had to generate data based off a drop down box and I didn't want to do a return trip for each new selection. A situation like I have 3 drop down boxes, the selection in drop down 1 will determine whats in 2, selection in 2 determines 3, etc. Something like that I really don't want to do a round trip for each of the selections of the drop down. I would do a server side script that would create a client side script that drives the adding and removing of data from the drop downs. I'm sure there are other situations but I havn't come across any other ones where I would have to pass data between client and server side scripts.
Reply With Quote
  #5 (permalink)  
Old 10-07-04, 16:44
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
Thanks for the answer. I believe what I am doing is very close to what you suggested.
I'll re-think my 'problem' again.
Reply With Quote
  #6 (permalink)  
Old 10-08-04, 00:20
priyanka-m6.net priyanka-m6.net is offline
Registered User
 
Join Date: Jul 2004
Posts: 94
Smile

If you still got problem with that, have a look at
http://www.w3schools.com/ado/default.asp

In detail you will get to know how the things are working between client and server side.
__________________
Priyanka
Windows web hosting with ASP,.Net,PHP,Perl,MySQL support
We help in making your dreams come true on internet!
Reply With Quote
  #7 (permalink)  
Old 10-08-04, 09:12
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
Thanks for the extra good info. It is a very informative site. I've bookmarked it.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On