Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > submit problem

Reply
Thread Tools

submit problem

 
 
david
Guest
Posts: n/a
 
      12-09-2003
I was experiencing a false bug with safari when trying to submit a post form
from a javascript script:

function my_submit()
{
document.theForm.submit.click();
}

it doesn't work in the "current" version (1.0 v85.6) of Safari (nothing
happens) while it works with mozilla (1.5) and IE. So i tried:

function my_submit()
{
document.theForm.submit();
}

but i was having an error message in the Mac OS Console application.

In fact, it was because of the name of my submit button:

<input type="submit" name="submit" value="whatever">

but if i change the name of the button:

<input type="submit" name="Submit" value="whatever">
^

then, the first method works on the 3 browsers

Since i didn't find anything about that on google, i think it's a good idea to
post it with the keywords i used for my research.

Cheers

--
david

 
Reply With Quote
 
 
 
 
david
Guest
Posts: n/a
 
      12-09-2003
david wrote:

> [...]


> then, the first method works on the 3 browsers


the second method, sorry

--
david

 
Reply With Quote
 
 
 
 
@SM
Guest
Posts: n/a
 
      12-09-2003
david a ecrit :

> david wrote:
>
> > [...]

>
> > then, the first method works on the 3 browsers

>
> the second method, sorry


Ah! Bon! that's better

with your last change in name of button to submit
try in firts method :

function my_submit() { document.theForm.Submit.click(); }

==> you ask to click on the element named 'Submit',
that's to say on the right button : submit

--
************************************************** ************
Stéphane MORIAUX : mailto:stephaneOTER-
Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS)
http://perso.wanadoo.fr/stephanePOINTmoriaux/internet/
************************************************** ************


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
STRUTS- <html:submit> does not submit on pressing Enter key Megha Vishwanath Java 2 10-02-2009 12:52 PM
Catching Submit Event even called by document.forms[0].submit() The Crow ASP .Net 2 09-27-2005 05:03 PM
javascript submit problem : form won't submit Joop Javascript 5 03-23-2005 07:48 PM
Preventing Multiple submit (Disabling Submit Button Post Click) Solution Mark ASP .Net 1 12-13-2004 08:03 PM
Disable Submit Button on Post back and On Submit in ASP.net Ghafran Abbas ASP .Net 0 10-12-2004 06:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57