JavaScript blank verification or not
This is a restaurant website, the menu can select the number of dishes, and then put in the shopping cart inside.
PHP Code
while (...) {echo "";}
Before the Post asked, but I asked the wrong, form is in the loop inside, so can not use getElementById to judge. Thank you for T5500 help me here.
There is only one input type=text in each form. Now, before each form is submitted, how can you tell that each text cannot be empty or 0?
------Solution--------------------
Onsubmit= ' return dosubmit (); '
Switch
Onsubmit= ' return dosubmit (this); '
Js
JScript Code
function Dosubmit (FMT) { if (Fmt.textbox_qty.value = = ") { fmt.textbox_qty.focus (); Alert (' cannot be null '); return false; } return true;}
------Solution--------------------
function IsEmpty ()
{
function IsEmpty () {
Here you see the function named two times. Is it a hand mistake or what?