473,406 Members | 2,894 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,406 software developers and data experts.

Name of the Form that was POSTed?

Is it possible to determine the name of the form that caused a page to
be submitted? I have seen numerous examples of how to determine the
method of the POST and how to retrieve data elements from the post,
but I haven't seen any way to know the name of the form that caused
the post.

The page that is POSTing to my script has two forms and I'd like to
know if I can determine which one of them was submitted without having
to add a hidden element to the forms.

Thanks, Tyler

Aug 22 '07 #1
1 1277
..oO(Tyler)
>Is it possible to determine the name of the form that caused a page to
be submitted?
Forms don't have a name. Any 'name' or 'id' attributes applied to a form
can be used in client-side scripting, but are not submitted to the
server.
>The page that is POSTing to my script has two forms and I'd like to
know if I can determine which one of them was submitted without having
to add a hidden element to the forms.
IMHO using a hidden element is the most reliable and safest way.

Another way would be to give the submit buttons in each form different
names and check which button was pressed, but this might not always work
as expected.

Micha
Aug 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mark.reichman | last post by:
First off.. Thanks to Grant Wagner for help in a previous thread related to this one. I am at a total loss... I have multiple fields in a form with the same name. Lets call the fields with the...
3
by: Scott Navarre | last post by:
Hello, I have a javascript function that I want to read the name of the form which is calling it. Here is my HTML: <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript">
4
by: Martin Lucas-Smith | last post by:
I am wanting to know whether are XHTML1-valid characters for use within an id attribute and/or a name attribute. ...
17
by: wolfing1 | last post by:
Like, I know if several checkboxes have the same name, I can get the ones that were checked after submit with a request.form("name") and maybe do a split(request.form("name"),",") to cycle through...
3
by: Jassim Rahma | last post by:
Hi, I have MDI Child called MDIChild_! and I want if the user click on the button which shows that form to invoke the same openned form not a new form everytime unless it's not openned then it...
6
by: Joe | last post by:
Hello All: Does anyone know the difference between the name and id attributes in an Html control? I noticed on PostBack that I can not retrieve the Request.Form("id_value") but I can retrieve...
24
by: Chameleon | last post by:
This code does not working in Mozilla. Works fine in IE. -------------- <input type=text value=100 name=textbox> <script> alert(textbox); </script> -------------- This perhaps, because of...
0
by: Moskie | last post by:
I have a form where the user is able to provide an arbitrary number of attachments. This is done through Javascript that dynamically generates INPUT fields, each of which has the NAME attribute set...
6
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few...
4
by: liberty1 | last post by:
Hi everyone. I appreciate your effort at helping newbies like me. I have the following problems and will appreciate urgent help. PROBLEM NUMBER 1: Using PHP and MySQL, I am able to upload...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.