javascript - Detecting when there is a response on an iframe? -


I have created an AJAX style file (using iframe) and all work well ... though , I should find out when IFrame has received a response ... see below:

Javascript:

  function download () {var ifrm = $ ('# iframedownload ') [0]; Ifrm.src = '/downloadfile.aspx?fileid=whatever'; Ifrm.onreadystatechange = function () {// Checking that (this.readyState == 'full') warning ("I really would like this piece to work!"); }; }  

C # for Downloadfile.aspx:

  Response Adhider ("content-nature", "attachment; file name =" "+ zip file name +" \ ""); Response.AddHeader ("Content-Length", respBytes.Length.ToString ()); Response.ContentType = "app / octet-stream"; Response.BinaryWrite (respBytes); Response.End ();  

Thanks.

.


Comments