Note that there are some explanatory texts on larger screens.

plurals
  1. POIFrame callback, server response not appearing on client
    primarykey
    data
    text
    <p>thanks for clicking. </p> <p>I am trying to get status feedback using an IFrame for file uploads. I am not trying to get progress or percentages - just when a file is done uploading and if it was a success or failure. </p> <p>THE PROBLEM is that I can't seem to get the server response to appear on the client. I have to following design:</p> <p>I have an iframe on my page:</p> <pre><code> &lt;iframe id="target_frame" src="" style="border:0px; width:0px; height:0px"&gt;&lt;/iframe&gt; </code></pre> <p>The form tag points to it:</p> <pre><code>&lt;form enctype="multipart/form-data" id="fileUploadForm" name="fileUploadForm" action="picupload.aspx" method="post" target="target_frame"&gt; </code></pre> <p>And the submit button starts a file upload via the iframe:</p> <pre><code>&lt;input id="submit" type="submit" value="upload" /&gt; </code></pre> <p>In the picupload.aspx.cs file, I have a method that returns dynamic data. I then send it to the client:</p> <pre><code>message = data; Response.Write(String.Format("&lt;script language='javascript' type='text/javascript'&gt;window.parent.handleResponse('{0}');&lt;/script&gt;", message)); </code></pre> <p>On the client, I have a response handler:</p> <pre><code> function handleResponse(msg) { document.getElementById('statusDiv').innerHTML = msg; } </code></pre> <p>My intent is to see the msg value change for each uploaded file but I never see anything appear in statusDiv, let alone dynamically changing messages.</p> <p>Can somebody please help??</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload