469,289 Members | 2,170 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

HTMLFormElement.submit() and submit value

1
I've a form that contains a submit button:
<input type="submit" name="submit" value="Submit" />

What I am trying to do is use javascript to make this automatically:
document.forms["myform"].submit();

The problem is that I need to access the value of $_POST['submit'] on server side.
The form submit method doesn't have any parameters and since it has the same name as the submit button, I am unable to do it.

Is there another way?
Nov 26 '06 #1
1 2203
acoder
16,027 Expert Mod 8TB
Either set a hidden form field value or use the click() method of the submit button.
May 30 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by jan | last post: by
1 post views Thread by quickcur | last post: by
2 posts views Thread by Man-wai Chang | last post: by
10 posts views Thread by k3pp0 | last post: by
1 post views Thread by sva0008 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.