views:

50

answers:

3

i have a upload file form and a iframe. form is submitted to a php script with target to iframe. i want to stop uploading file when user click on a stop uploading button. how can i stop transfering data to iframe?

+1  A: 

You have to break the connection. And the only way to do this is to reload the page with

btn.onclick = function() { window.location.reload(true); }
alemjerus
A: 

You can't. You could reload the iframe though.

Jonathan Sampson
A: 

finally i use this:

function stopiframe('iframename'){
    if(/MSIE (\d+\.\d+);/.test(navigator.userAgent))
    window.frames['iframename'].window.document.execCommand('Stop');
    else
    window.frames['iframename'].window.stop();
}
MoosaMaher