title: Hidden iframe chrome callback not fired
body: <p>I'm developing a web page using the hidden frame technique to retrieve some data from the server.
  The data is updated in real time, and the server notifies the browser on each modification..</p>
  
  <p>The component is working in both IE and Firefox, but in chrome, the callback function retrieved by the server is not executed in the client browser.
  However i can see the connection opened in the developer tools, and the received data through that connection growing.</p>
  
  <p>I have read that some browsers could have problems parsing and executing the data received from the server, but I wasn't able to find a solution for those cases.</p>
  
  <p>Maybe i need to send some http header to this case, but i dont even know what to search.</p>
  
  <p>EDIT: Code sample
  This is the function i'm using to connect to the server. It is called after a sign in step. The sign in is implemented in the same way as the connect step.</p>
  
  <pre><code>function __sendConnectRequest()
  {
      document.getElementById(UID).setAttribute('value', __username);  
      document.getElementById(SID).setAttribute('value', __sessionKey);
      document.getElementById(PID).setAttribute('value', __privateKey);
      try
      {
          document.getElementById('connectFormId').submit();  
      }
      catch (err)
      {
          alert("error connecting");
          console.log("__sendConnectRequest: " + err.message);
      }    
  }
  
  
  var __connectResponseCallback = null;
  function __setConnectResponseCallback(callback)
  {
      __connectResponseCallback = callback;
  }
  
  function __connectResponseHandler(statusCode)
  {
       if(__connectResponseCallback)
       {
          __connectResponseCallback(statusCode);       
       }
  }
  </code></pre>
  
  <p>This is how i create my DOM elements. This elements are being appended to the body of the document, and the form has some input strings.</p>
  
  <pre><code>function getNewIframe(name, id)
  {
      //KNOWN BUG IN IE while creating iframes
      //http://webbugtrack.blogspot.com/2007/10/bug-235-createelement-is-broken-in-ie.html
      var iframe;
      try
      {
          iframe = document.createElement('&lt;iframe name="' + name + '"&gt;');
      }
      catch (ex)
      {
          iframe = document.createElement('iframe');
          iframe.name = name;
      }
      iframe.id = id;
      iframe.style.display = 'none';
      return iframe;
  }    
  
  function getNewForm(name, id, target, action)
  {
      var form = document.createElement("form");
      form.name = name;
      form.id = id;
      form.method = 'post';
      form.target = target;
      form.action = serverUrl+action; 
      form.style.display = 'none';
      return form;
  }    
  </code></pre>