title: Script Not working from code behind
body: <p>I need to close the download window(opened using jquery framedialog) after clicking the download button inside the content page of the framedialog. I am creating a seperate iframe for sending download file in response like this:(Download.aspx sends the file to client based on file id)</p>
  
  <pre><code>var script = @"&lt;script language=JavaScript&gt;function Export(fileID)
                              {
                                      var iframe = document.createElement('iframe');
                                      iframe.src = 'DownloadForm.aspx?ID='+ fileID;
                                      iframe.style.display = 'none';
                                      document.body.appendChild(iframe);
                                      //alert('AlertBox'); 
                              }
                              &lt;/script&gt;"; 
  Page.ClientScript.RegisterStartupScript(typeof(string), "Startup", script);  
  </code></pre>
  
  <p>After completing download i am closing the download window.
  But my problem is that if i use the commented alertBox then my both codes works (download and close) fine. But i want it to happen without alert box. When i do not use alert box the Download.aspx page is not called. (I think the script is not going to client side while i register it and alert box is making it do something)..Dont know why its happening ..kindly help..Thanks in advance</p>