Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session("variables") and vbscript

Status
Not open for further replies.

rizza

Programmer
Jul 16, 2002
66
US
Is it possible to use session variables in a vbscript_onClick() subroutine. If so how or at leaset a simple example would be great????


Thanks in advance-

Brian
 
Hi there ...
simply no ...
because session variables are created on server and your
vbscript is running on the client side.
so th only way to use it send it your sub as a variable
like this :
<input type=&quot;button&quot; value=&quot;click me&quot;
onclick=&quot;vbscript_onClick('<%=Session(&quot;MyVariable&quot;)%>')&quot;>
and also there is an other way of using it.
you can use it like this too :
sub vbscript_onClick()
msgbox(&quot;<%=Session(&quot;MyVariable&quot;)%>&quot;)
end sub
that's it.

TNX
E.T.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top