Java Script inf. loop

  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Posts: 371
  • Loc: Riverside, CA

Post 3+ Months Ago

Ok so im using a script. Here is a snipplet:

Code: [ Select ]
var delay_hide=500

where 500 is the milliseconds before the text dissaprears. I was wondering what i could set it to, so that it would never dissaprear. I put it to 50000000000000000000000000000000000000000 and then veiwed it and my computer turned off lol. So i need to know a inf loop kinda thing.
  • joebert
  • Genius
  • Genius
  • User avatar
  • Posts: 13511
  • Loc: Florida

Post 3+ Months Ago

:?: :!:
Let me get this straight, you want to use a loop to modify a javascript to make the script do somthing that text does naturally ?

There must be an IGNORE THIS class for text in the script or somthing you can pull out of it.
Using a never ending loop to get text to stay visible just has me scratching my head :?
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

The absolute best reslt you will get from a never ending loopis thathe browser will freeze and stop sponding (trust me I have done it by accident)! Often as you have discovered, this will also crash the entire system. How about this:

Simple way:
remove the line code that hides the text

different simple way:

Code: [ Select ]
var delayHide = A_Number;
  1. var delayHide = A_Number;
  2. if(delayHide>=0){
  3.   setTimeout('functionCall()',delayHide);
  4. }

(using the if then shortcut is appropriate but I always forget the syntax!)

Then you set delayHide to -1 and the text will ever go (assuming you are using a timeout.

If this does not aswer your question, some more info might just be handy - I don't really get what you intend to achieve with this

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 69 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.