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)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: banerjee.partha, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
474 bytes,
text/html
|
Details |
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
Comment 1•19 years ago
|
||
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
Comment 2•19 years ago
|
||
> action="test.cfm'
Mismatched quotes?
Summary: Hidden field trivia → Form that only has hidden fields can't be submitted
Comment 3•19 years ago
|
||
(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.
Reporter | ||
Comment 4•19 years ago
|
||
(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>
Comment 5•19 years ago
|
||
I see only this:
Error: document.frmAuto has no properties
Source File: file:///C:/....html
Line: 10
Comment 6•19 years ago
|
||
Attached is the testcase I used and it works fine.
Updated•19 years ago
|
Attachment #224064 -
Attachment is obsolete: true
Comment 7•19 years ago
|
||
My mistake for some reason I don't understand that works locally but not when uploaded.
Comment 9•19 years ago
|
||
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.
Comment 10•19 years ago
|
||
Comment 11•19 years ago
|
||
Which works fine for me (Mac trunk), as well as demonstrating the https-to-http form submission warning and a bug in session history.
Comment 12•19 years ago
|
||
I filed bug 340017 on document.formName not working in XHTML.
Comment 13•19 years ago
|
||
I'm guessing the back button being broken with this testcase is covered by one of the dependencies of bug 340021.
Comment 15•18 years ago
|
||
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
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•