...

View Full Version : validate input text with predeterminate value



urgido
10-18-2006, 11:56 PM
I have an input text with value=Lois so I want to validate this input. If some user enter another word different of Lois will give an alert, and if in the field one writes the word Lois (without importing capital letters or minuscule) the form can be executed in correct form.

Regards

Philip M
10-19-2006, 08:34 AM
I am not sure that I understand what is intended here,
but

function checkForLois(which) {
var theName = which.value;
if (theName != "Lois") {
alert ("You must enter 'Lois' in this box to proceed");
return false;
}
}

onsubmit = "checkForLois(this)"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum