Need help with validation - noob!
Hi guys, I'm new to PHP and I'm trying to sort out a site at work.
We have a form that users fill in, I'm wanting it to bring up a message if the following criteria are met
"temp1" on the form has "Shape Creation Request" selected (this is the value of an option) AND the length of "temp11" is under 22 characters
at the moment I have the following that doesn't work:
an example of one of the alerts we have that does work is:
if(document.all.temp1.str=="Shape Creation Request" and document.all.temp11.value.length <22)
alert("Please provide the full publication code including edition.");
any help would be greatly appreciated as I need to replicate this for some other fields too
alert("Please provide the full name of the person making the request, whether this is yourself or another user.");
This belongs in PHP...
Originally Posted by Likegames
sorted now anyway
replaced "str" with "value" and "and" with "&&"
does document.fail look much cooler than document.all?
signature under construction
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)