Passing variables from client-side to server-side 
Author Message
 Passing variables from client-side to server-side

How can I pass variables from client-side to server-side within the same
page?

I am using an InputBox method upon opening the page and the client's input
is used in determining the sort order of SQL statement used to create the
page.

<script language="VBScript">
dim input
input = inputbox("Input sort order")
</script>
<%
Dim SortOrder
SortOrder = input  'Basically this is what I want to do.
...
...
%>

Thank you!



Sun, 07 Nov 2004 20:31:09 GMT  
 Passing variables from client-side to server-side
You need to either use a querystring or a form to the same page (eg. target
= '_self') or to another (hidden) frame page that can then modify you
original page using the DHTML and browser DOM (cross-frame scripting).

You can also look at asynchronous methods such as XMLHTTP request and
response (XML browsers only) and the infamous Microsoft Remote Scripting
Applet (included with the std. scripts if you develop in Interdev at all -
should work on anything cos it's an applet?).

You could also look at creating a new xml object in the browser using DHTML
and set the src attribute to be an ASP page that returns XML - not sure if
this will work cos I've never done it.

What you *can't* do is directly call server side code from the client side.

Chris Barber.


How can I pass variables from client-side to server-side within the same
page?

I am using an InputBox method upon opening the page and the client's input
is used in determining the sort order of SQL statement used to create the
page.

<script language="vbscript">
dim input
input = inputbox("Input sort order")
</script>
<%
Dim SortOrder
SortOrder = input  'Basically this is what I want to do.
...
...
%>

Thank you!



Sun, 07 Nov 2004 20:40:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing variables from server-side to client-side

2. Passing variable from server side to client side

3. How Can I Pass Data Between the Server Side and the Client Side VB/JScript

4. ASP referring to server side variables in client side script

5. pass server side vbscript to client side javascript

6. how to pass client side values to server side

7. Passing Server Side Arrays to Client Side Scripts

8. Passing Server side vars to Client side

9. Passing a server side var to client side block

10. Uh ? Client side and Server side variables

11. Client-side to Server-side variable?

12. Server side variables to client side script?

 

 
Powered by phpBB® Forum Software