Crossrocket.1 Master Cheater
Reputation: 0
Joined: 16 Nov 2007 Posts: 307
|
Posted: Wed Dec 17, 2008 7:02 pm Post subject: if else java script |
|
|
heres what i have:
| Code: | function checkForm(frmTemp) {
var error = false;
if (frmTemp.txtAn.value.length<3){
alert("Error: Either you forgot to add a word for an animal or your word is less then 3 words long");
error = true;
}
if(frmTemp.txtRoom.value.lenght<3){
alert("Error: Either you forgot to add a word for a room or your word is less then 3 words long");
error = true;
}
if(frmTemp.txtNme.value.lenght<3){
alert("Error: Either you forgot to add a name or your word is less then 3 words long");
error = true;
}
if(frmTemp.txtFnme.value.lenght<3){
alert("Error: Either you forgot to add a friend's name(1) or the name is less then 3 words long");
error = true;
}
if(frmTemp.txtFnme2.value.lenght<3){
alert("Error: Either you forgot to add a friend's name(2) or the name is less then 3 words long");
error = true;
}
if(frmTemp.txtFnme3.value.lenght<3){
alert("Error: Either you forgot to add a friend's name(3) or the name is less then 3 words long");
error = true;
}
if(frmTemp.txtCol.value.lenght<3){
alert("Error: Either you forgot to add a color or your color is less then 3 words long");
error = true;
}
if(frmTemp.txtFlo.value.lenght<3){
alert("Error: Either you forgot to add a Florida 'Place' or your place is less then 3 words long");
error = true;
}
if(frmTemp.txtNycb.value.lenght<3){
alert("Error: Either you forgot to add a Newyork city building or your building is less then 3 words long");
error = true;
}
return error;
}
|
But it doent work the way i want it to.
if the person enters the first one 3 or more letters, then the story shows up. can u make it so it checks the whole god damn function?
_________________
|
|