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
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
Share Improve this question asked May 31, 2012 at 17:05 lukenjohnsonlukenjohnson 1131 silver badge10 bronze badges2 Answers
Reset to default 4Another 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.
use http://api.jquery./jQuery.ajax/ or http://api.jquery./jQuery.post/ to send the information to process.asp