Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Scott Cantor
Scott CantorReporter
myhandisadolphin@mailinator.com
myhandisadolphin@mailinator.comComponents
Fix versions
Affects versions
Created July 8, 2013 at 9:22 AM
Updated August 4, 2021 at 9:25 PM
Resolved November 21, 2013 at 5:59 PM
If initial POST data that gets preserved contains a key called "submit", the Javascript code on
postTemplate.html
fails to submit the POST to replay the request. The reason is that the form will contain a:<input type="hidden" name="submit" value="submit" />
which causes document.forms[0].submit to reference the
<input>
element, and no longer the submit function. Calling document.forms[0].submit() in this case generates this error:A solution that works in modern browsers is this:
var frm = document.forms[0]; if (typeof(frm.submit) == "function") { frm.submit(); } else { var x = document.createElement("form"); x.submit.apply(frm); }
Doesn't work in IE6 though, in which
x.submit.apply
does not exist for some weird reason. For that browser I was not able to find a way to call the originalsubmit()
function, so it might be necessary to manually add an input button withappendChild
and.click()
it in anotherif (x.submit.appy)
branch, or restore the noscript submit button alltogether and require the user to click it.