Page MenuHomePhabricator
Paste P1822

firefoxForms.html
ActivePublic

Authored by Jdlrobson on Aug 3 2015, 11:16 PM.
Tags
None
Referenced Files
F357591: firefoxForms.html
Aug 3 2015, 11:16 PM
Subscribers
None
<!DOCTYPE HTML>
<html>
<body>
<h1>Firefox will not submit forms that are not in the DOM</h1>
In Chrome this form will get submitted and address bar will change to ?name=val<br>
In Firefox this form does not get submitted.<br>
I'm not sure which is the right behaviour.
<form id="foo" method="get" action="firefoxform.html">
<input type="text" name="name" value="val">
<input type="submit">
</form>
<script type="text/javascript">
var form = document.getElementById( 'foo' );
form.parentNode.removeChild( form );
form.submit();
</script>
</body>
</html>

Event Timeline

Jdlrobson changed the title of this paste from untitled to firefoxForms.html.
Jdlrobson updated the paste's language from autodetect to autodetect.