p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   equating javascript and ASP variables (http://p2p.wrox.com/showthread.php?t=1169)

GregH July 2nd, 2003 03:54 AM

equating javascript and ASP variables
Hi all,

This is a hybrid javascript/ASP page question.

Is it possible to pass data from a javascript variable into an ASP variable (VBScript) on the same page. What is the correct syntax?

I can only get it to work from ASP into javascript, not the other way round.

Any advice is greatly appreciated


Greg Griffiths July 2nd, 2003 05:06 PM

The only way you can do it is to write the Javascript variables into a form / querystring which is being submitted to the ASP - you could use something like an IFrame or a New Window to make this almost invisible to the user.

rodmcleay July 2nd, 2003 08:23 PM

Hidden form fields would be a more stable way to make the form invisible to the user.
Depending on what your needs are you could use js to put all the variables you need into one hidden form field separated by commas.
Use your asp split function to separate them on the server.
More info would help choose the best way.

GregH July 3rd, 2003 02:42 AM

Thanks all for the feedback.

Just knowing that the task involves a submission/refresh completely alters my thoughts on the matter.

Many thanks for the advice.



All times are GMT -4. The time now is 07:07 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.