lakeside12
Programmer
hi
I apologize for starting a new thread, it was just too convoluted to add this in....
Question:Is there a way to use this on form validation method (below) in a hyperlinked method i.e when you click the hyperlink it verifies the form before executing the hyperlink to the next page
FORM VALIDATION BELOW WORKS (from this forum thank you)
Any errors on the form prevent it from being submitted - Perfect!
REASON: I need to have my own Submit Button graphic, not the standard HTML one, and I do not know how to change that standard HTML submit button, not sure that is possible, hence my attempt to use a hyperlink instead.
Many thanks
I apologize for starting a new thread, it was just too convoluted to add this in....
Question:Is there a way to use this on form validation method (below) in a hyperlinked method i.e when you click the hyperlink it verifies the form before executing the hyperlink to the next page
FORM VALIDATION BELOW WORKS (from this forum thank you)
Code:
<form xyz... onSubmit="return checkme(this)">
....
......
function checkme(what)
{
var err=''
if (!what.PhoneDay.value.match(/^[0-9]{11}$/)) err+='\n - Your Phone number must be 10 digits e.g. 905 505 1122'
if (!what.Zipcode.value.match(/^[0-9]{5}$/)) err+='\n - Your zip code must contain 5 correct digits'
if (!what.FirstName.value.length) err+='\n - first name must be completed'
if (!what.LastName.value.length) err+='\n - Last name must be completed'
if (err) alert('Errors occured :'+err)
return err==''
}
Any errors on the form prevent it from being submitted - Perfect!
REASON: I need to have my own Submit Button graphic, not the standard HTML one, and I do not know how to change that standard HTML submit button, not sure that is possible, hence my attempt to use a hyperlink instead.
Many thanks