How can you assign a Session variable to a client-side variable. Since, session would be executed on the server-side and your JS scripts would be executed on the clients computer. I think u cant do that.
Then, how can I pass a value, which is got in client-side, to server-side? Can I call a client-side function, which returns a value, in server-side script? Actually, I am in trouble on how to communicate between client and server sides script very well....please advise.
How can you assign a Session variable to a client-side variable. Since, session would be executed on the server-side and your JS scripts would be executed on the clients computer. I think u cant do that.
DS wrote:[color=blue]
> In client-side script (<script> codes </script>), how can set / get
> session variables' values? Pls advise.
>
> DS[/color]
There was a technique posted sometime in the last couple weeks for setting a
session variable via an IMG tag on the page. I'll see if I can find it
later.
In the meantime, you can also use XMLHTTP to pass a value to a server-side
page which can then set a session variable. A Google search, or a visit to www.aspfaq.com, should provide you with a few examples.
To pass a session variable's value to client-side script, simply
response.write it:
client_side_var = "<%=session("va r")%>"
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Comment