Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > JavaScript > submitting a pa...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 35671 of 37484
Post > Topic >>

submitting a page

by sheldonlg <sheldonlg> May 20, 2008 at 08:15 PM

I have the following:

<input type="image" src="images/submit.jpg" width="70" height="30" 
border="0" onclick="validateRegister()" />

It is inside a form where:

<form action="register_submit.php" name="register" id="register" 
method="post">

At the end of validateRegister() I have:

if (msg.length > 0) {
   alert(msg);
} else {
   do***ent.register.submit();
}

after having built the msg based upon any errors.  (It starts with
var msg = '';)

What I am happening is that it alerts the message of all the errors 
because msg.length > 0, but then it submits the page!!!  Even if I 
comment out the do***ent.register.submit(), it still submits it.

How can it submit the page if not a single call is made to post and 
there is not button for submit?
 




 8 Posts in Topic:
submitting a page
sheldonlg <sheldonlg&g  2008-05-20 20:15:28 
Re: submitting a page
Bjoern Hoehrmann <bjoe  2008-05-21 02:21:14 
Re: submitting a page
sheldonlg <sheldonlg&g  2008-05-20 22:06:42 
Re: submitting a page
=?ISO-8859-1?Q?=22=C1lvar  2008-05-21 09:25:02 
Re: submitting a page
sheldonlg <sheldonlg&g  2008-05-21 05:39:23 
Re: submitting a page
BootNic <bootnic.bounc  2008-05-21 00:35:39 
Re: submitting a page
sheldonlg <sheldonlg&g  2008-05-20 21:26:30 
Re: submitting a page
sheldonlg <sheldonlg&g  2008-05-20 22:10:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 23:08:25 CST 2008.