Jump to content

similar to sleep()


rfox

Recommended Posts

I basically have text displayed on the screen saying

 

processing . . .

 

Would be cool if I could say

 

processing *pause 1 second* .*pause 1 second* .*pause 1 second* .

 

<?php sleep(1) ?>. <?php sleep(1) ?>. <?php sleep(1) ?>.

 

I thought would display a . then wait 1 second. Rather then that, it simple doesn't display anything for 3 seconds, then everything is shoved on the screen at once.

 

How do I get that to work  ???

Link to comment
Share on other sites

hey pcbytes, thanks, but not quite.

 

It times the first dot, and the last 2 dots up come at the same time, so it just looks like a laggy website haha.

 

Also, while its printing out the dots, it doesn't load the rest of the site. So you cant see the bottom half of the website (All the code past the print dot)

 

I was looking at w3schools, but I could do with some help with javascript if possible, I am very... VERY bad @ javascript.. help would be awsome!

 

<script type="text/javascript">

var i=0

 

function timer(){

while (i<=3){

var t=setTimeout("document.write(' .')", 1000)

i=i+1

}

}

</script>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.