Note that there are some explanatory texts on larger screens.

plurals
  1. POCan safari/chrome/opera make ajax requests while an upload is in progress?
    primarykey
    data
    text
    <p>Basically i am making a simple ajax request</p> <pre><code>function upload(){ setInterval(function callMeOften() { $.ajax({ method: 'get', url : 'uploadinfo.php?unique_id=&lt;?php echo $some_uniq_id; ?&gt;', dataType : 'text', success: function(text){ updatebar(text); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.status); alert(XMLHttpRequest.responseText); } }); }, 5000); } function updatebar(per){ $('#updateMe').animate({"width" : per}); } </code></pre> <p>to a php script</p> <pre><code>$unique_id = $_GET['unique_id']; $progress = uploadprogress_get_info($unique_id); if(function_exists("uploadprogress_get_info")) { if (floor(($progress['bytes_total']/1024)/1024) &gt; 100){ echo "run"; } else { if ($progress['bytes_uploaded'] == 0 || $progress['bytes_total'] == 0){ echo "100"; } else { echo floor($progress['bytes_uploaded'] / $progress['bytes_total'] * 100); } } </code></pre> <p>}</p> <p>This function upload(); is called using the onsubmit(); action of a file upload form</p> <pre><code>&lt;form id="something" onsubmit="upload();" action="status.php" enctype="multipart/form-data" method="post"&gt; </code></pre> <p>I am using relative paths and the request works in FF and IE, but in chrome, safari and opera the ajax requests are not even fired while the upload is in progress. </p> <p>What's going on?</p> <p>EDIT: In the end i just showed the upload progress in a separate window that was created using the onsubmit action and re-sized and reposition to the center of the screen, looks alright and is by far the easiest way</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