|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Help JavaScript validation Please help me
Hello,
I have no idea what i am doing can you tell me whats wrong with this function please gives me a syntax error######################################### <SCRIPT LANGUAGE=JAVASCRIPT> <!-- function validateMyForm1 () { if(document.forms[0].addToCart1.quantity.value=> "3") { alert("Quantity Exceeds Stock "); return false; }else{ return true; } } --> </SCRIPT> |
|
#2
|
||||
|
||||
|
you were missing a closing curly brace }.
try this Code:
function validateMyForm()
{
if(document.forms[0].txtQuantity.value >= 3)
{
alert("Quantity Exceeds Stock ");
return false;
}
else
{
return true;
}
}
|
|
#3
|
||||
|
||||
|
You the man :¬) dam those close#ing curly brackets dam them all
Cheers dude ! |
|
#4
|
||||
|
||||
|
its gone silly
I have this in a for each loop it did work some of the forms but not all so i have modifyed it a tad but to no avail have attached txt view source |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Help JavaScript validation Please help me |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|