Click to See Complete Forum and Search --> : Javascript and ASP
omarswan
Jul 15th, 2000, 10:37 AM
Hi,
I have a JavaScript Function that returns a numeric value.
How can I take that value and then use it with my ASP or VBScript Code.
Clunietp
Jul 15th, 2000, 11:36 AM
I would use a hidden input box on a form. After submitting the form, ASP can read the value of the form variable and work with it as required
omarswan
Jul 15th, 2000, 11:39 AM
How would you set the hidden value
Clunietp
Jul 15th, 2000, 11:49 AM
here is a quick page I put together:
<HTML>
<SCRIPT language=Javascript>
function SubmitIt()
{
// set the value
document.frmMain.txtJSResult.value = "HELLO WORLD!";
// display that the value is set
window.alert(document.frmMain.txtJSResult.value);
// submit the form
document.frmMain.submit();
}
</SCRIPT>
<BODY>
<form name=frmMain method=post>
<input name=txtJSResult type=hidden>
</form>
<Input type=Button name=cmdSubmit value=SUBMIT onclick="SubmitIt();">
</BODY>
</HTML>
omarswan
Jul 15th, 2000, 12:06 PM
Thanks
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.