SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 10th, 2004, 08:17 AM
Bowser Bowser is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 2 Bowser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Storing from text boxes into arrays

Hi , I am trying to store guesses from the text box into the Array. and it will not do it. Could you help me out?? here is my code.

//<html>
// <head>
// <title>Javascript Assignment III</title>
// </head>
// <body>
// <script language="javascript">
// <!--
// var myNumber = Math.random()*10;
// var Number = Math.round(myNumber);
// document.write(Number);
// var Guess = new Array();


// function Check(dataAccept)
// {
// var InputBox1 = eval(document.frmRandom.guess.value)

// if (InputBox1 < 0 || InputBox1 > 100)
// {
// window.alert("Error: you are out of range, pick again.");
// }
// if (InputBox1 == Number)
// {
// window.alert("Correct");
// for (p=0;p<=0;p++)
// {
// Guess[p] = InputBox1
// }
// for (n=0; n<=Guess.length-1;n++)
// {
// document.write("<b>"+"<font color ='blue'>"+"YOU WIN"+"</font>" + "</b>" + "<br/>" + "The correct number was: " + "<b>" + Number + "</b>" +"<br/>" + "Previous Guesses: " +
// "<br/>" + Guess.length + ": " + p + "<br/>" + "Number of guesses used: " + "<b>" + Guess.length + "</b>" + "<br/>" +
// "<br/>" + "<a href='JSassignment3.htm'>" + "Click to play again" + "</a>");
// }
// }
// if(InputBox1 > Number)
// {
// window.alert("Lower. You have " + Guess + "guesses left!");
// }
// else if (InputBox1 < Number)
// {
// window.alert("Higher. You have " + Guess+ "guesses left!");
// }
// }


// //-->
// </script>
// <h3>Javascript Assignment III</h3>
// Number guessing game.<br/>
// <br/>
// Please enter your guess between 1 and 100:<br/>
// <form name="frmRandom">
// <input name="guess" type="text" size="5" />
// <input name="checkGuess" type="button" value="Check" onClick="Check(Number);"/>
// </form>
// </body>
//</html>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Storing from text boxes into arrays


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway