Spudhead
12-16-2002, 04:04 PM
I have a form, and some JS validation that goes on. The validation is called by an onSubmit="return doValidation()" in the form tag - if the form fields are filled in ok, it returns true and the form submits. If not, the user's HD is immediately crushed. Or something.
The very last thing this validation JS does before returning true is alert() the value of a particular input box: "grand_total". Although the value is "" on page load, by the time the form submits it will ALWAYS have a value, and it always alerts it ok.
The page that handles this form submission looks like this:
<%
var grandTotal=String(Request.Form("grand_total").value);
Response.Write(grandTotal+"<br>");
Response.End;
%>
Which will, I promise, be added to - once I figure out why, in the name of Santa and all his Little Helpers, it currently writes "undefined<br>".
It HAS a value - at least, one that the JS validation on the previous page can read. The form field name is right, the same setup can access other fields on the form, so where has the form value gone?
ps - and no, I don't think I can get to it through the form collection or whatever it is, as a variable number of form fields are generated and I wouldn't know what index number to use.
The very last thing this validation JS does before returning true is alert() the value of a particular input box: "grand_total". Although the value is "" on page load, by the time the form submits it will ALWAYS have a value, and it always alerts it ok.
The page that handles this form submission looks like this:
<%
var grandTotal=String(Request.Form("grand_total").value);
Response.Write(grandTotal+"<br>");
Response.End;
%>
Which will, I promise, be added to - once I figure out why, in the name of Santa and all his Little Helpers, it currently writes "undefined<br>".
It HAS a value - at least, one that the JS validation on the previous page can read. The form field name is right, the same setup can access other fields on the form, so where has the form value gone?
ps - and no, I don't think I can get to it through the form collection or whatever it is, as a variable number of form fields are generated and I wouldn't know what index number to use.