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 Link to comment https://forums.phpfreaks.com/topic/48414-js-strange-execution-problem/ 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 Link to comment https://forums.phpfreaks.com/topic/48414-js-strange-execution-problem/#findComment-236755 Share on other sites More sharing options...
fenway Posted April 24, 2007 Share Posted April 24, 2007 Huh? Link to comment https://forums.phpfreaks.com/topic/48414-js-strange-execution-problem/#findComment-237309 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); Link to comment https://forums.phpfreaks.com/topic/48414-js-strange-execution-problem/#findComment-237476 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.