Closed Bug 339944 Opened 19 years ago Closed 18 years ago

Form that only has hidden fields can't be submitted

Categories

(Core :: DOM: Core & HTML, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: banerjee.partha, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 The following code works in Firefox 1.0.7: ------------------------------------ <form name="frmAuto" action="test.cfm' method="post"> <input type="text" name="xyz" value="10"> </form> <script language="JavaScript"> document.frmAuto.submit(); </script> ------------------------------------ But the following code gives error in Firefox 1.0.7: <form name="frmAuto" action="test.cfm' method="post"> <input type="hidden" name="xyz" value="10"> </form> <script language="JavaScript"> document.frmAuto.submit(); </script> What I want to say is that if you have only hidden fields in the form, it cannot be submitted. I stumbled upon this new thing. Did anyone of you also face this problem? If so let me know. Also tell me if this bug is documented anywhere. Reproducible: Always
Just tested this and it works fine for me. WFM: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060530 Minefield/3.0a1 - Build ID: 2006053103
> action="test.cfm' Mismatched quotes?
Summary: Hidden field trivia → Form that only has hidden fields can't be submitted
(In reply to comment #2) > > action="test.cfm' > > Mismatched quotes? > That looks like it, wrote my own testcase so I missed that. Sorry. Breaks with invalid quotes but that's how it should work I'm guessing.
(In reply to comment #0) > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) > Gecko/20050915 Firefox/1.0.7 > Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) > Gecko/20050915 Firefox/1.0.7 > > The following code works in Firefox 1.0.7: > ------------------------------------ > <form name="frmAuto" action="test.cfm' method="post"> > <input type="text" name="xyz" value="10"> > </form> > > <script language="JavaScript"> > document.frmAuto.submit(); > </script> > ------------------------------------ > But the following code gives error in Firefox 1.0.7: > > <form name="frmAuto" action="test.cfm' method="post"> > <input type="hidden" name="xyz" value="10"> > </form> > > <script language="JavaScript"> > document.frmAuto.submit(); > </script> > > What I want to say is that if you have only hidden fields in the form, it > cannot be submitted. I stumbled upon this new thing. Did anyone of you also > face this problem? If so let me know. Also tell me if this bug is documented > anywhere. > > Reproducible: Always > its not a matter of quotes or double quotes. It was a typo here. my code contained <form name="frmAuto" action="test.cfm" method="post"> <input type="hidden" name="xyz" value="10"> </form>
I see only this: Error: document.frmAuto has no properties Source File: file:///C:/....html Line: 10
Attached file Example that works fine. (obsolete) —
Attached is the testcase I used and it works fine.
Attachment #224064 - Attachment is obsolete: true
My mistake for some reason I don't understand that works locally but not when uploaded.
So the testcase in comment 6 *does* demonstrate this bug?
No, the testcase in comment 6 demonstrates something else: XHTML (served as application/xhtml+xml, or loaded locally as .xhtml) doesn't get the document.formName feature.
Which works fine for me (Mac trunk), as well as demonstrating the https-to-http form submission warning and a bug in session history.
I filed bug 340017 on document.formName not working in XHTML.
I'm guessing the back button being broken with this testcase is covered by one of the dependencies of bug 340021.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a5pre) Gecko/20070516 Minefield/3.0a5pre This works for me in both Firefox 2 and trunk. ->WORKSFORME
Assignee: nobody → general
Component: General → DOM: HTML
Keywords: testcase
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → ian
Hardware: PC → All
Version: unspecified → 1.8 Branch
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: