0 Replies Latest reply on Apr 26, 2010 11:00 AM by Abram Adams

    Can HTML component handle html form posts to target="_blank"

    Abram Adams Level 1

      I'm writing a simple Air app that uses the HTML component to render an existing web application.  Per researching this I found that you must create a custom HTMLHost class in order for the HTML component to behave like a web browser when it comes to pop-ups.  So I have done this, and javascript pop-ups work great (as well as <a target="_blank"....)  However if I have a <form target="_blank"... it does nothing, no pop-up, no error, nothing.

       

      Now, to work around this I have attempted to pop up a new window via JavaScript and then post the form to the new window.  This opens my window, but the form never posts to the new window.  Here's my JS code:

       

           function submitForm(){
                var myForm = document.forms['batchPrint'];
                var w = window.open('about:blank','Popup_Window');
                myForm.target = "Popup_Window";
                myForm.submit();
              }
      

       

      This works when I render via FireFox/IE, but just opens a blank window and never posts when I run it in the Air app.

       

      Any ideas?