• Post Reply Bookmark Topic Watch Topic
  • New Topic

Submit button not work in Netscape  RSS feed

 
Sophia Choi
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use resin as my web server and write a form in jsp. My form has two fields.One is userid and another is password. After pressing a submit button, it doesn't jump to another page in Netscape 7.0. Actually, it works without problem in IE.
What is the problem?
Thanks.
INPUT type="button" value="Enter" click="datacheck()"
-------
function datacheck()
{

if(frmLogin.UserNm.value == "")
{
window.alert("Please sign up your user id !");
document.frmLogin.elements(0).focus();

return ;
}


if(frmLogin.UserPasswd.value == "")
{
window.alert("Please input your password !");

document.frmLogin.elements(1).focus();
return ;
}
frmLogin.submit();
}
 
Shubhrajit Chatterjee
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using wrong DOM objects in some of the places in you code.
Fro example to access the textbox value in the HTML you must use this
document.<form name>.<text box name>.value
or to
submit the form .. you must use
document.<form name>.submit();
etc.. etc...
 
umar hathab
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

The button should have onClick handler instead of click and form should be submitted using document.frmLogin.submit()...
This may help...btw correct me if I am wrong..
A.Umar
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!