Mark
04-14-2004, 12:18 AM
Hey Guys/Girls,
I haven't been here in about 3/4 of a year, but I'm back, and really need your help!
As some of you'll might know, I'm studying Software Development, and one of my courses includes web scripting. Right now, I'm finishing up my course in javascript but am kinda stuck (to my suprise) on an assignment.
In the attached files I've included whatever I've reached up to, the actual assign requirements, and a screebshot of what it should look like.
These are some of the problems I'm facing right now. I really hope some JS guru knows how I can fix it:
- I'm not sure why my global variables are not working correctly. For example, I want to set global variables for all the form field values, but when I enter the function, it says its "undefined/no object"
- I did one of the bonus requirement, which says to create the game area in a new window. But in the new window, if I click "stop/close", I'm not sure how to stop the spawning of new windows every interval
- in one of the functions, I have the following code:
//if (timeg == "0")
var win = window.open("", "win", "width=450, height=350, resizable=0, posx= window.clientWidth");
var doc = win.document;
I tried to put it in an if statement (so that the window only spawn when the time is 0), but if I do that, I cannot write to the window (says "object not defined" or something like that)
- lastly, I'm not too sure how to detect what grade letter the user clicked on. I created seperate div tags for each grade, and gave it a name... butI'm not sure how to detect it and add the points.
Someone please help ...
(this is kinda embarrasing for me as I'm one of the top ppl in the class ... lol ... it's just this assign that is screwing me up)
Thanks!
Mark
I haven't been here in about 3/4 of a year, but I'm back, and really need your help!
As some of you'll might know, I'm studying Software Development, and one of my courses includes web scripting. Right now, I'm finishing up my course in javascript but am kinda stuck (to my suprise) on an assignment.
In the attached files I've included whatever I've reached up to, the actual assign requirements, and a screebshot of what it should look like.
These are some of the problems I'm facing right now. I really hope some JS guru knows how I can fix it:
- I'm not sure why my global variables are not working correctly. For example, I want to set global variables for all the form field values, but when I enter the function, it says its "undefined/no object"
- I did one of the bonus requirement, which says to create the game area in a new window. But in the new window, if I click "stop/close", I'm not sure how to stop the spawning of new windows every interval
- in one of the functions, I have the following code:
//if (timeg == "0")
var win = window.open("", "win", "width=450, height=350, resizable=0, posx= window.clientWidth");
var doc = win.document;
I tried to put it in an if statement (so that the window only spawn when the time is 0), but if I do that, I cannot write to the window (says "object not defined" or something like that)
- lastly, I'm not too sure how to detect what grade letter the user clicked on. I created seperate div tags for each grade, and gave it a name... butI'm not sure how to detect it and add the points.
Someone please help ...
(this is kinda embarrasing for me as I'm one of the top ppl in the class ... lol ... it's just this assign that is screwing me up)
Thanks!
Mark