Jump to content


Photo

Reset and echo Question


  • Please log in to reply
2 replies to this topic

#1 avo

avo
  • Members
  • PipPipPip
  • Advanced Member
  • 148 posts
  • Locationstaffordshire uk

Posted 11 April 2006 - 04:18 PM

HI All

Im sure there is a very easy answer to this one if you can help please what im trying to do is on a reset of a form is echo out "Form Reset" then after 5 seconds echo "" (nothing) but the code bellow make my page sleep for 5 seconds instead and then dont echo a blank space.(remove text Form Reset.


          <?      
if ($_POST['subReset']) {
   echo "Form Reset"; 
   sleep (3);
   echo "";
} else {
   echo "";
}
?>




All Help Appriciated.
Im loving it ........

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 11 April 2006 - 04:23 PM

Its never going to work the way you expect without yet another request to the server. All of which are a waste of resources.

This would be much better done client side using javascript.

#3 avo

avo
  • Members
  • PipPipPip
  • Advanced Member
  • 148 posts
  • Locationstaffordshire uk

Posted 11 April 2006 - 05:06 PM

HI

Thankyou for your reply

Just out of curiosity what woukd the code be do this



thanks.
Im loving it ........




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users