Guessing Game/GPA calc/BGcolor assignment help URGENT!!!! PLEASE!

liunx

Guest
First off I appologize for the double post, this is just super urgent... and I need as much help as I can get. <br />
<br />
<br />
<br />
I am taking a beginning JavaScript course right now and our assignment is the following:<br />
<br />
Game with help: <br />
<br />
Create an HTML document that allows users to play a guessing game. Think of a number and assign it to a variable. Use the <INPUT> tag in a form to create a text box that a user can use to guess the number. Use another <INPUT> tag to create a button named guess. Write a timeout that asks the users if they want to stop the game if they do not press the guess button within 10 seconds. If the user selects OK, close the web browser window. If the user decides to continue(by pressing Cancel button), then restart the game and the timeout. <br />
<br />
Save this file as lab5_1.html. <br />
In the file, add a HELP button, which, once clicked will open a pop-up window with instructions on how to play the game <br />
The help page (named lab5_1_help.html) will have the following properties: <br />
200 pixels wide, 100 pixels high <br />
No scrollbar, Not resizable, No Menubar and No Status bar <br />
Save your files as lab5_1.html and lab5_1_help.html<br />
<br />
<br />
GPA: <br />
Create an HTML file with JavaScript which will ask users for grades for 4 classes: Math 102, Spanish 105, CSCI 202 and PE 112 <br />
Accept only values between 0 and 4 <br />
Eventually, you should compute and output the student's GPA <br />
Save your file as lab5_2.html.<br />
<br />
BGCOLOR:<br />
Create a window, selecting size and color: <br />
In this exercise you will modify the code shown here <!-- m --><a class="postlink" href="http://www.ac.wwu.edu/~granier/Spri...ab05/color.html">http://www.ac.wwu.edu/~granier/Spri...ab05/color.html</a><!-- m --> to allow user to select the colors of the current window. <br />
The change of color will be called from a button placed on a file named lab5_3.html. <br />
<br />
<br />
<br />
<br />
Here is what I have so far for the first one, anyone want to help me with it and the other two? I would greatly appreciate it. <br />
<br />
GAME:<br />
<br />
<!-- m --><a class="postlink" href="http://www.ac.wwu.edu/~pludem/cs202...b05/lab5_1.html">http://www.ac.wwu.edu/~pludem/cs202...b05/lab5_1.html</a><!-- m --><br />
<br />
GPA:<br />
<br />
Dont know where to start...<br />
<br />
BGCOLOR:<br />
<br />
<SCRIPT><br />
<!--- Hide JavaScript Code<br />
<br />
function ApplyColor() {<br />
var BCR=document.CP.BackRed.value;<br />
var BCG=document.CP.BackGreen.value;<br />
var BCB=document.CP.BackBlue.value;<br />
<br />
// You will need more code here..<br />
<br />
document.bgColor=BackColor;<br />
<br />
}<br />
<br />
</SCRIPT><br />
</HEAD><br />
<br />
<BODY><br />
<br />
<br />
<FORM name=CP><br />
RED: <INPUT size=2 value=00 name=BackRed><br />
GREEN: <INPUT size=2 value=00 name=BackGreen><br />
BLUE: <INPUT size=2 value=00 name=BackBlue><br />
<INPUT onclick=ApplyColor(); type=button value='Change Color'><br />
<input name="button" type=button onClick=location.reload(); value=Refresh><br />
</form><br />
<br />
<br />
Thank you!<!--content-->Question 3: You have two choices: convert the RGB values to hex (which is the more complicated choice), or just use the RGB values as they are.<br />
<br />
Here is an example of using RGB values in JavaScript:<br />
<br />
function OK(){<br />
document.bgColor="rgb(255,255,0)";<br />
} <br />
<br />
You can easily figure out the extra coding to do that.<br />
<br />
The GPA one seems super easy. I'll leave you to do that one. The reason for projects such as these is to figure stuff out yourself: you learn better that way. :)<!--content-->Well thanks for the help... I didnt want someone to tell me the answer more give me clues... after spending hours working on it.. and the fact that it was due... I was just asking for assistance, I know the importance of these projecfts.<!--content-->
 
Back
Top