Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Location
    USA
    Posts
    54

    Unanswered: 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.

  2. #2
    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

  3. #3
    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.

  4. #4
    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.

  5. #5
    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.

  6. #6
    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!

  7. #7
    Join Date
    Aug 2004
    Location
    USA
    Posts
    54
    Thanks for the extra good info. It is a very informative site. I've bookmarked it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •