guybrush Posted April 24, 2007 Share Posted April 24, 2007 Hi everyone! I'm trying to make a script like this schema: 1) ...start... 2) change text value with "loading...." 3) execute operations 4) change text value with "done!" 5) ...end... Problem: does not execute the number "2" or did it so fast that feel unseeable This the easy code: parent.document.getElementById('BUT01').value='ELABORAZIONE... '; <? sleep(2);?> parent.document.getElementById('BUT01').value='FINITO'; what I can Try? P.S. Sleep(2) is like an elaboration of 2 seconds P.S.2. I call "parent" 'cause the execution is in a iframe Quote Link to comment Share on other sites More sharing options...
guybrush Posted April 24, 2007 Author Share Posted April 24, 2007 Update: the problem is pretty different. The client-side run run then server-side is done... So i need to find any function that can empty buffer or .... anything else donno if it's php or js Quote Link to comment Share on other sites More sharing options...
fenway Posted April 24, 2007 Share Posted April 24, 2007 Huh? Quote Link to comment Share on other sites More sharing options...
nogray Posted April 24, 2007 Share Posted April 24, 2007 you can't sleep in JS, use setTimeout instead parent.document.getElementById('BUT01').value='ELABORAZIONE... '; setTimeout("parent.document.getElementById('BUT01').value='FINITO'", 2000); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.