Hello! I'm developing un'extension for firefox to speed up some operations.

Virtually the context-menu of Firefox add a link to translate a selected word.
The site on which I support requires a form with POST method to submit requests, and then using the javascript I created a special form.

I tried the javascript through an html page for testing and everything works, while the same function call extension firefox hangs before myForm.submit ().

Code:
 sendForm function (search_p) / / search_p is the selected word 
  (  
    / / I create my FORM 
      var MyForm = document.createElement ( "form"); 
      myForm.method = "POST"; 
      myForm.action = "SITE URL"; 
      myForm.name = "FORM NAME";   
  
      myselect = document.createElement ( "select"); 
      myselect.name = "language"; 
      option = document.createElement ( "option"); 
      opzioni.value = "ingita"; 
     
      / / Etc etc ... code not important 
      / / .... 

      myselect.appendChild (options); 
      myForm.appendChild (myselect); 

      / / This line I removed because it blocked what ..  
      / / Document should refer? 
      / / Document.body.appendChild (MyForm); 
  
     / / Without the above line to here coming Zenza problems  
     / / But does not make the request 
     myForm.submit (); 
  )
It could be that the test page I have an actual document from which to start the application while firefox .. no .. (click the context menu that calls the javascript) .. and does not handle well the form.submit?

I hope to be clear .. any ideas?