send javascript variable to classic asp

假如想象 提交于 2019-12-31 05:15:11

问题


I have a jQuery-powered cost calculator, and I want to allow the webpage to send a summary of the calculator's values in an email. The server runs on classic ASP.

How do I retrieve javascript variables with ASP?

I understand that the ASP code runs before the page loads, and the javascript code runs only after the page is loaded, since the javascript is not runat="server".

How can I store javascript variables so that I can retrieve them with ASP code on a processing page?

calculator with Javascript --> form action = "process.asp" --> ASP to pick up javascript values

College Cost Calculator


回答1:


Another solution is to set the values of the javascript variables to hidden form fields. Submit the form and read the form values on the server-side. After reading the values, create and send the email.




回答2:


use http://api.jquery.com/jQuery.ajax/ or http://api.jquery.com/jQuery.post/ to send the information to process.asp



来源:https://stackoverflow.com/questions/10838067/send-javascript-variable-to-classic-asp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!