• Post Reply Bookmark Topic Watch Topic
  • New Topic

Loops  RSS feed

 
Rose Evans
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys...I have a question, it's dealing with loops, but it is in javascript, not sure where I should post my question, but I figured a loop is a loop, right?
So, please can you tell me what I am doing wrong here?
Here's my code.


PS...I know my code looks silly .....had to take out some things for it to be able to post on here....
 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might like to try the html and javascript forum for questions regarding javascript.
As for your loop it is doing exactly what it is programmed to do i.e. loop.
What is the loop there for?
[ June 28, 2005: Message edited by: Nigel Browne ]
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rose,

First, there is a JavaScript forum here. It's down in the Engineering section, and is called "HTML and JavaScript".

Second, i know NOTHING about JavaScript, but i think i know what the problem is. i'm assuming you put up some kind of window with a bunch of check boxex/radio buttons. the user selects one of them, and clicks ok. we then enter your loop.

What does your if/else if/else block do? it seems to figure out what the message in the alert box should be based on some user choice, and (possibly) displays it.

your loop will iterate 6 times. what's in your loop? your if block.

So i guess i'd say there is nothing wrong with the loop. But i'd ask why do you HAVE the loop?
 
Rose Evans
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ha, I have no idea why it has to be there, my code works beautifully without the loop. My instructions are to create a for loop using an alert box to display the selection......I'm not sure why it's needed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!