Get javascript variable data into ASP variable?

ahurtt

Diamond Member
Feb 1, 2001
4,283
0
0
You have not posted anywhere near enough information about your particular situation and the problem you are trying to overcome. Without knowing more about your specific environment/requirements, I'd say you could pass the value of the variable from the ASP to the JSP in a query string parameter.
 

Thyme

Platinum Member
Nov 30, 2000
2,330
0
0
He said Javascript, not JSP which changes things.

Javascript is strictly client side and ASP is strictly server side. It's easy to pass them, as ahurtt suggested, as a query string. If it's on a form, ASP will pick it up, or else you can make a hidden element. However, this won't be in real time. The user will have to POST or GET for them to interact.
 

ahurtt

Diamond Member
Feb 1, 2001
4,283
0
0
Originally posted by: Thyme
He said Javascript, not JSP which changes things.

Javascript is strictly client side and ASP is strictly server side. It's easy to pass them, as ahurtt suggested, as a query string. If it's on a form, ASP will pick it up, or else you can make a hidden element. However, this won't be in real time. The user will have to POST or GET for them to interact.

Oh yeah you're right. . he did say javascript. I don't know why I thought jsp. To get a javascript variable value into an asp variable value, you just assign the javascript variable value into the value attribute of a hidden form field and have that form submit to the very same asp page that contains the hidden form. Then you just get the value as a request parameter.