Hi all, im trying to figure out this JavaScript, and i need some asssitance i need to make a javascript that will create a prompt box asking you to input a number, then display that number in a new prompt box...thing is i can do this in IF statements, but they need to be done in while loops/for loops its driving me insane any help? Ryan
I have NO idea what you are really asking, so here is a script that continually asks for a number to be inputted. If this doesn't give you what you need, please clarify: Code: <script language="javascript"> var MyNum; MyNum = prompt("Input your number here:"); while (MyNum != "") { MyNum = prompt("Your number is " + MyNum + ". Please enter another:"); } </script>
bless my soul...thank you very much...it worked...i can see where i messed up now.....i screwed up on the +MyNum+ part there...i have seen the light thanks Gritz Ryan
i guess i should explain myhself, asking "why is he wanting from us now?" put simply, it was for class...or rather an assignment, our teacher is an ass to be polite, she seems to believe that anyone taking this class should know every bloody thing about php/html/dreamweaver etc.......well i don't, and she also seems to believe that teaching is worthless...handouts?...nope......class presentations?...nope......any coherant help at all?...marginal...* so after struggling with what little documentation i had for 2 days, i came here to ask, as it was the only part that i'd hung up on., thanks for the help *explains why the class average is 38% Ryan