K
KathyB
Hi, I have the following submit code:
<form name="finish" action="Hidden_Birth2.aspx" method="post"
onsubmit="return CheckInput(this);">
<input style="CURSOR: HAND" type="submit" name="finish"
value="FINISH"/>
<b>Click the FINISH button when work instruction is complete.</b>
</form>
and here is my CheckInput script:
function CheckInput()
{
var cnAll = document.all;
for (var i=0;i<cnAll.length;i++)
{
if(cnAll(i).tagName=='input' && cnAll(i).type=='text')
{
alert("You must first complete and SAVE all user inputs!");
return false; }
}
}
....seems to work as far as checking for the elements (type=text), but
if it does not return false; the action of the form (loading the aspx
page) doesn't seem to work. I'm working in asp.net, and I just get a
blank page. Since it is in the hmtl and if the js fails, still can't
figure out HOW to find the problem...since it just quits.
Any help appreciated.
Kathy
<form name="finish" action="Hidden_Birth2.aspx" method="post"
onsubmit="return CheckInput(this);">
<input style="CURSOR: HAND" type="submit" name="finish"
value="FINISH"/>
<b>Click the FINISH button when work instruction is complete.</b>
</form>
and here is my CheckInput script:
function CheckInput()
{
var cnAll = document.all;
for (var i=0;i<cnAll.length;i++)
{
if(cnAll(i).tagName=='input' && cnAll(i).type=='text')
{
alert("You must first complete and SAVE all user inputs!");
return false; }
}
}
....seems to work as far as checking for the elements (type=text), but
if it does not return false; the action of the form (loading the aspx
page) doesn't seem to work. I'm working in asp.net, and I just get a
blank page. Since it is in the hmtl and if the js fails, still can't
figure out HOW to find the problem...since it just quits.
Any help appreciated.
Kathy