By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

submit problem

P: n/a
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

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
david wrote:
[...] then, the first method works on the 3 browsers :)


the second method, sorry

--
david

Jul 20 '05 #2

P: n/a
@SM
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:st*********************@wanadoo.fr
Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS)
http://perso.wanadoo.fr/stephanePOINTmoriaux/internet/
************************************************** ************
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.