473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 2288
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

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

Similar topics

7
by: NotGiven | last post by:
I changed my POST to GET and find appended to the url, the above string. Why and what can I do to NOT have them appended? Thanks.
2
by: Matt | last post by:
Can form.submit() submit another form? In the following example, in page1.asp, it is fine to submit the current form: form1.submit(), and and I could see the value "Joe" in page2.asp. However, if I...
7
by: jan | last post by:
Hi, Problem: I have asigned a number (34) in javascript to ANB10 then i want to submit with: <INPUT NAME = "totale prijs" TYPE = "HIDDEN" VALUE=ANB10> but when I submit the form I see on my...
3
by: TR | last post by:
A company that lets affiliates search its database assumes that affiliates will paste code, which looks something like this, into their web pages: <form method="GET" name="search_5"...
1
by: quickcur | last post by:
Hi: Here is my page, I do not know how to write the onlcik="..." line. <input type=button value="Submit" onclick="location.href='http://mypage.html?param=***"> <form> .... </form>
2
by: Man-wai Chang | last post by:
I have a form formABC that has a textbox plus a button. On clicking the button, window.open() a popup window for user to select a value. The value will then be passed back to formABC's textbox. ...
10
by: k3pp0 | last post by:
Hello. Here's my example form: <form method="get" action=""> <p> <input type="radio" name="radio_example" id="radio1" value="radio1_val" /> <label for="radio1">radio button one</label> </p>
1
by: sva0008 | last post by:
I have a form with name DSform. i have two submit buttons with value "save all" and "save some " the action of the form is page2.asp. I am using this code in function ...
1
Eleven
by: Eleven | last post by:
Hi, I'm trying to get a value from a textbox then save it to the database as a hex number. Here's what I have so far, but its totally wrong.. it converts the value I enter in the textbox to a hex...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.