开发者

Change browser tab status

I have an upload form that posts a file. When I click submit, the browser t开发者_StackOverflow中文版ab status naturally changes to a loading/waiting image to show the page is doing something while the upload takes place.

My issue is that when the file is done uploading and is posted to the upload page I have set, the browser status stays as loading at that point as well. At this point I can change the page and the script that the file is posted to will finish. To show the user that the uploading process is done, I was wondering if there was a way to reset the browser tab status so it does not show as loading as this point.

<form action="testing12345.php" target="progressFrame" method="post" id="uploadform" enctype="multipart/form-data" onsubmit="beginUpload();">
<input type="hidden" name="UPLOAD_IDENTIFIER" id="progress_key" value="" />
<input type="hidden" name="username" value="<?php echo $session->username; ?>"/>
<input type="hidden" name="token" value="<?php echo $token; ?>" />
<input type="hidden" name="action" value="processing" />
<input type="file" name="Filedata" id="Filedata" />
</form>


You can try using JavaScript? Use window.stop();. Though I do find it strange that the browser isn't stopping itself.


As far as I know, no you can't toy with the tab activity indicator.

Your question seems to tell "The activity indicator keeps cycling even after the upload is done".

The reason it keeps cycling is because it's doing background processing. If the processing seems done but it keeps cycling, it might be an issue with your firefox configuration, the network or the "return script" (waiting for an answer).

It also seems you are submitting your form to a frame (target="progressFrame"). If this frame keeps trying to load (after uploading the file) it will keep the activity indicator active.

But you said it stopped cycling after uploading in the comments...

If it does stop once the file finish uploading, then there is no problem and it should stay that way. Even if the user can keep on browsing the site, if they close the browser, the upload will be interrupted. This is the only indicator they seems to have, so it should stay. You should tell your users when the uploading is done by some way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜