trigger event at upload end

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ciary
    Recognized Expert New Member
    • Apr 2009
    • 247

    trigger event at upload end

    hi all,

    i wasnt really sure where to post this since it's a combination of Javascript and PHP. i'm trying to make a fileuploader without reloading the page.

    my structure: at the moment, i can upload files without reloading the page. i set the target of the upload form to a hidden iframe and loaded upload.php in it.

    my problem: when the upload starts, i make a div 'loading' visible. to hide it again i trigger an event when the upload is done. or at least that was the idea. i dont know how to trigger it.

    Code:
    <iframe id="upload_target" name="upload_target"  src="#" style="width:0;height:0;border:0px solid #fff; display:none;">
    		<script language="javascript" type="text/javascript">
    			top.window.stopUpload();
    		</script>
    	</iframe>
    this is my code so far, but it doesn't work.
  • Ciary
    Recognized Expert New Member
    • Apr 2009
    • 247

    #2
    i found my mistake: the script had to be in the upload.php file, not in the iframe itself.

    sorry for the trouble

    Comment

    Working...