View Single Post
Old Oct 11th, 2005, 2:13 PM   #3
sykkn
Hobbyist Programmer
 
Join Date: Apr 2004
Location: Texas
Posts: 106
Rep Power: 5 sykkn is on a distinguished road
code in tags ...

function val2()
{

    var regVal;

    regVal= new RegExp("^[1-366]$");

    if (!regVal.test(document.f1.duration.value))
    {
          
	    alert('Please enter a duration between 1 and 366 days');
		document.write (regVal.test(document.f1.duration.value));

//pls note the above line prints the result of the match to the screen . Every time the alert text says the match was false it really was false, not just a misfire of the alert text.  

		
    }

}
__________________
[ [ SykkN alloc ] initWithThePowerTo: destroyYouAll ];
/* Don't make me use it! */
sykkn is offline   Reply With Quote