Is there a way for the javascript to know what field name triggered the function. I would like to keep this nonspecific so that I can use the same function for more than one textfield on the same form.
Below is what I have so far. The problem is that even though I get a return of 'true', I am still getting that the date is not valid. I also need to be able to use a date in the format of 1/2 and have the script reformat it to 1/2/2007. Thanks again for your help.
//validate date field...
Thanks again. I had tried changing that but wasn't sure what to change it to. Below is what I ended up with and it is working.
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function s(num) {
amount = num * 1; // amount is the num or NaN
if (isNaN(amount)) { // if the entire is not a number...
Thanks for your help but I am getting an error the error 'null' is null or not an object. By prcess of elimination the line getting this error is var allAmounts = myForm.getElementsByTagName("input");
I have a form with textfields that are dynamically created and named from a recordset. There are 2 textfields created by each record Ex. sAccountId1, sAmount1 and are incremented based on the number of records. The record count is stored in another textfield. I need to use javascript to add...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.