...

File Uploading Problems

snoodle
07-12-2007, 04:14 AM
I am trying to clean up my AJAX file uploading code and am having the following problem...

The PHP code that does the actual upload, creates the new file, and massages and resizes the final file all works great. The problem is the little piece of javascript code that is attempting to monitor the status of the process. The files I am uploading are relatively small, so a status bar is not really the issue. Right now I am uploading pictures, so the issue is getting the resulting picture to display in the IMG field properly.

In the code that is waiting for the upload to finish, the http.open call is made with a onreadystatechange = GetStatus. The first upload I do, http.readyState goes from 1 to 4 as expected. When it hits 4, I do my IMG refresh and all is fine. The problem is any subsequent calls don't seem to work. The onreadystatechange seems to continually get called (though the readyState says 4, the clearInterval doesn't seem to work, and the code to refresh never gets updated.

Any clues?

A1ien51
07-12-2007, 04:50 AM
check out my post here:

http://codingforums.com/showpost.php?p=586561&postcount=11

Eric

snoodle
07-12-2007, 05:02 AM
wow... thanks alien. it worked!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum