K
KathyB
Hi.
I have an hmtl page with a function to see if there are any input text
boxes. If so, that means a user did not complete them (once entered,
my xsl stylesheet makes them text instead of text input boxes, so
there should be NO input boxes when the user is clicking the FINISH
button. However, the FINISH button script still indicates that input
boxes exist...new to this...return false issue? Is there a better way
to do this? I also need to send a querystring or form collection for
(hidden_birth2.aspx?finish=yes). I couldn't get the script right to
open the page with querystring from the function, so I ended up doing
it with this <form> element...probably not the best way. Any help
appreciated! Thanks. Kathy
function CheckInput()
{
var cnAll = document.all;
for (var i=0;i<cnAll.length;i++)
{
if(cnAll(i).tagName=='INPUT')
{
alert("You must first complete and SAVE all user inputs!");
return false; }
}
}
HTML snippet:
<form action="Hidden_Birth2.aspx" method="post" onsubmit="return
CheckInput();">
<input type="Submit" name="finish" value="FINISH">
<b>Click the FINISH button when work instruction is complete.</b>
</form>
I have an hmtl page with a function to see if there are any input text
boxes. If so, that means a user did not complete them (once entered,
my xsl stylesheet makes them text instead of text input boxes, so
there should be NO input boxes when the user is clicking the FINISH
button. However, the FINISH button script still indicates that input
boxes exist...new to this...return false issue? Is there a better way
to do this? I also need to send a querystring or form collection for
(hidden_birth2.aspx?finish=yes). I couldn't get the script right to
open the page with querystring from the function, so I ended up doing
it with this <form> element...probably not the best way. Any help
appreciated! Thanks. Kathy
function CheckInput()
{
var cnAll = document.all;
for (var i=0;i<cnAll.length;i++)
{
if(cnAll(i).tagName=='INPUT')
{
alert("You must first complete and SAVE all user inputs!");
return false; }
}
}
HTML snippet:
<form action="Hidden_Birth2.aspx" method="post" onsubmit="return
CheckInput();">
<input type="Submit" name="finish" value="FINISH">
<b>Click the FINISH button when work instruction is complete.</b>
</form>