javascript - Why can't I submit a dynamically created form in Firefox -


I have copied a part of a large project on which I am working, I have not written the code, so I hope That someone help me know that why a post request of the JS code from this fashion is sent, it works in IE and is not in other browsers.

  function f () {var container = document.createElement ("form"); Container. Method = "post"; Container .action = "http: // localhost: 3203 / somefile.aspx"; Document.appendChild (container); Container.submit (); }  

Try document.body.appendChild (container) Instead.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -