It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

while loop,

while loop,

Postby chucky on Thu Feb 11, 2010 9:53 am

hi all,

this is a very simple question regarding looping.

in my script my while loop is not looping, it will do one run of the statement with in the while { } braces.

the condition for the while i need to use is

while ( X != 0 );

if i set the X count to any thing but 0 prior to the while loop my script freezes.
but im presuming the reason my while loop only runs once is due to X = 0 as soon as the while loop begins?

there is a function in my while loop that changes X, i know this is working as i have been document.write(X); after every line that changes X.
chucky
 
Posts: 1
Joined: Wed Feb 10, 2010 9:47 am
Location: CO, denver

Re: while loop,

Postby harrierdh on Thu Feb 11, 2010 3:06 pm

Chucky,
Can you post a little more code? Like everything affecting X. The full while loop and the function that is changing X.
There's just not enough to go on here.
Thanks
harrierdh
50+ Club
 
Posts: 51
Joined: Wed Dec 16, 2009 7:04 pm


Who is online

Users browsing this forum: No registered users and 5 guests