Internet School Bus
Home
Math Quizzes
PreSchool Games
First Grade Math
Misery Date Game
Linux On Laptop
JavaScript
|
This page contains a listing
and sometimes an explaination of the JavaScript Objects,
Object Properties, Methods, Event Handlers and home grown
functions used at the Internet School Bus - Interactive
Math Quizzes Site.
Javascript information is listed below for most pages on this
site where JavaScript is used.
- Internet
School Bus - Interactive Math Quizzes; Home Page
-
- Objects and Object Properties:
- document.images
- document.images[].src
- Methods:
- Event Handlers:
- onMouseOver
- onMouseOut
- onClick
- Home grown Functions:
-
- Basic Math; Whole
Numbers; Level 1
-
- Objects and Object Properties:
- document.images
- document.images[imageName].src
- document.FORMNAME.TEXTBOXNAME.value
- document.FORMNAME.BUTTONNAME.length
- document.FORMNAME.BUTTONNAME[i].checked
- document.bgColor
- Radio buttons
- Push buttons
- Methods:
- eval( )
- Math.random( )
- tempstring.subString( )
- alert( )
- new Date( )
- nowsecond.getSeconds( )
- msgWindow = open( )
- msgWindow.document.close( )
- document.write( )
- Event Handlers:
- OnClick
- onMouseOver
- onMouseOut
- Home grown Functions:
- function switchthem(imageName,imageFile)
- Swap the image displayed for an
onMouseOut and onMouseOver Event.
- function clearvalues( ) - Clears all the
values for each input text box in the
form.
- function writeequation(firstnum,
operand1, secondnum) - Write values to
the appropriate input text boxes.
- function randomnumbers(mathtype) -
Randomly generate a number. Uses
Math.Random( ) and tempstring.Substring(
) to return a number between 0 and 99.
- function checkselection( ) - This function will check to see which of the radio buttons is selected. Call a function to get randomized numbers, then call a function to write them.
- function checkanswer( ) - This will
calculate 2 numbers stored as values in
input text boxes and compare them against
the answer supplied in another input text
box.
- function showanswer( ) - Calculates 2
numbers stored in input text boxes and
issues an alert( ) with the answer.
- function gettableadd( ) - Opens up a new
window with another URL, leaving the
calling window still open.
- function gettablemulti( ) - Opens up a
new window with another URL, leaving the
calling window still open.
-
- Basic Math; Whole
Numbers; Level 2
-
- Objects and Object Properties
- document.images
- document.images[imageName].src
- document.FORMNAME.TEXTBOXNAME.value
- document.FORMNAME.BUTTONNAME.length
- document.FORMNAME.BUTTONNAME[i].checked
- document.bgColor
- Radio buttons
- Push buttons
- Methods
- eval( )
- Math.random( )
- tempstring.subString( )
- alert( )
- new Date( )
- nowsecond.getSeconds( )
- document.write( )
- Event handlers
- OnClick
- onMouseOver
- onMouseOut
- Home grown functions - some minor pieces were
acquired elsewhere.
- function switchthem(imageName,imageFile)
- Swap the image displayed for an
onMouseOut and onMouseOver Event.
- function clearvalues( ) - Clears all the
values for each input text box in the
form.
- function writeequation(firstnum,
operand1, secondnum) - Write values to
the appropriate input text boxes.
- function randomnumbers(mathtype) -
Randomly generate a number. Uses
Math.random( ) and tempstring.subString(
) to return a number between 0 and 999.
- function checkselection( ) - This function will check to see which of the radio buttons is selected. Call a function to get randomized numbers, then call a function to write them.
>
- function checkanswer( ) - This will
calculate 2 numbers stored as values in
input text boxes and compare them against
the answer supplied in another input text
box.
- function showanswer( ) - Calculates 2
numbers stored in input text boxes and
issues an alert( ) with the answer.
-
- Basic Math; Whole
Numbers; Level 3
-
- Objects and Object Properties
- document.images[imageName].src
- document.FORMNAME.TEXTBOXNAME.value
- document.FORMNAME.BUTTONNAME.length
- document.FORMNAME.BUTTONNAME[i].checked
- document.bgColor
- Radio buttons
- Push buttons
- Methods
- eval( )
- Math.random( )
- tempstring.subString( )
- alert( )
- new Date( )
- nowsecond.getSeconds( )
- document.write( )
- Event handlers
- OnClick
- onMouseOver
- onMouseOut
- Home grown functions - some minor pieces were
acquired elsewhere.
- function switchthem(imageName,imageFile)
- Swap the image displayed for an
onMouseOut and onMouseOver Event.
- function clearvalues( ) - Clears all the
values for each input text box in the
form.
- function writeequation(firstnum,
operand1, secondnum) - Write values to
the appropriate input text boxes.
- function randomnumbers(mathtype) -
Randomly generate a number. Uses
Math.random( ) and tempstring.subString(
) to return a number between 0 and 999.
- function checkselection( ) - This function will check to see which of the radio buttons is selected. Call a function to get randomized numbers, then call a function to write them.
- function checkanswer( ) - This will
calculate 2 numbers stored as values in
input text boxes and compare them against
the answer supplied in another input text
box.
- function showanswer( ) - Calculates 2
numbers stored in input text boxes and
issues an alert( ) with the answer.
-
- Basic Math;
Fractions; Level 1
-
- Objects and Object Properties
- document.images
- document.images[imageName].src
- document.FORMNAME.TEXTBOXNAME.value
- document.FORMNAME.BUTTONNAME.length
- document.FORMNAME.BUTTONNAME[i].checked
- document.FORMNAME.HIDDENELEMENTNAME.value
- Hidden element
- document.bgColor
- Radio buttons
- Push buttons
- Methods
- Math.random( )
- tempString.subString( )
- eval( )
- alert( )
- new Date( )
- nowsecond.getSeconds( )
- Event handlers
- OnClick
- onMouseOver
- onMouseOut
- Home grown functions - some minor pieces were
acquired elsewhere.
- function switchthem(imageName,imageFile)
- Swap the image displayed for an
onMouseOut and onMouseOver Event.
- function clearvalues( ) - Clears all the
values for each input text box in the
form.
- function getmathtype( ) - Loop through
all radio buttons by this name and see
which one is checked(true).
- function writeequation(firstnum,
operand1, secondnum) - Write values to
the appropriate input text boxes.
- function randomnumbers(mathtype) -
Randomly generate a number. Uses
Math.random( ) and tempstring.subString(
) to return a number between 0 and 9.
- function checkselection( ) - This function will check to see which of the radio buttons is selected. Call a function to get randomized numbers, then call a function to write them.
- function calculateit(typesmath) - Add or
subtract the 2 fractions listed in the
input text boxes and compute answer as a
fraction. Will be computed into a final
answer represented by a whole number and
any remaining fraction. Uses HIDDEN input
text fields for holding numbers during
the calculations.
- function showanswer( ) - Uses the HIDDEN
input fields which contain the correct
answer and uses alert( ) to display
answer.
- function changecolor( ) - Get the time in
seconds. Depending on the time change the
document background color.
- function checkanswer( ) - Use the values
supplied by the user and compare them to
the values stored in the HIDDEN objects
to determine if user supplied correct
answer.
-
- Count The Squares
-
- Objects and Object properties
- document.images
- document.images[imageName].src
- document.FORMNAME.HIDDENELEMENTNAME.value
- document.FORMNAME.IMGNAME.src
- document.bgColor
- Push Buttons
- Methods
- Math.floor( )
- Math.random( )
- alert( )
- new Date( )
- onLoad( )
- window.location.reload( )
- Event handlers
- OnClick
- OnMouseOver
- OnMouseOut
- Home grown functions - some minor pieces were
acquired elsewhere.
- function switchthem(imageName,imageFile)
- Swap the image displayed for an
onMouseOut and onMouseOver Event.
- function getcolor(refcolor1) - Use
Math.floor and Math.random to generate a
number from 0-400. From this value,
randomly change the SRC property for the
IMG tag for the 20 IMG tags in the game.
Also sets a reference color to compare
against.
- function setanswertotal( ) - Get the
length (number of characters) of the
value stored in a HIDDEN object.
- function newcolor( ) - Set
document.FORMNAME.IMGNAME.SRC to equal a
function call. Call another function to
set HIDDEN objects to the totals
generated for each of the 4 colors.
- function checkanswer(num) - Take the
value passed from the onClick event and
compare it to the correct answer. If
incorrect change the background color for
the document.
- function showanswer( ) - Uses the alert(
) method to display the correct answer.
-
- Misery Date Game
-
- Objects and Object Properties
- document.images
- document.images[imageName].src
- window.location
- FORMNAME.elements.length
- FORMNAME.elements[i].name
- FORMNAME.elements[i].checked
- FORMNAME.elements[i].value
- document.FORMNAME.RADIOBUTTONNAME.checked
- Radio Buttons
- Push Button
- Reset Button
- Methods
- alert( )
- document.FORMNAME.RESETBUTTON.click( )
- new Date( )
- nowsecond.getSeconds( )
- new Array( )
- Event handlers
- OnClick
- OnMouseOver
- OnMouseOut
- Home grown functions - some minor pieces were
acquired elsewhere.
- function switchthem(imageName,imageFile)
- Swap the image displayed for an
onMouseOut and onMouseOver Event.
- function gotourl( ) - Change
window.location to a new_url. Then reset
all the radio buttons to unchecked by
using
Document.FORMNAME.RESETBUTTON.click( ).
- function seturl(returnvalue) - From the
value passed to this function set
new_url. Then call gotourl( ) which will
change the window.location to the new
URL.
- function gogetdate( ) - Run through all
the elements in the form and note which
ones are checked. The only elements we
care about are the 16 Radio buttons.
Create a local variable that equals the
concatenated list of buttons that are
checked. Uses the element number(0-15)
associated with the Radio button. Pass
this variable to a function that will set
the new_url.
- function checkrate( ) - The form contains
16 Radio buttons. 4 Down and 4 Across.
The Radio buttons are grouped in a
vertical pattern by naming them the same.
We want the user to be able to select 1
radio button for each of the horizontal
options. This function checks to see if
the user checked more than 1 radio button
for each of the horizontal options.
-
- JavaScript on this page
-
- Objects and Object Properties:
- document.images
- document.images[].src
- Methods:
- Event Handlers:
- onMouseOver
- onMouseOut
- onClick
- Home grown Functions:
For more information on JavaScript or JScript follow the following links to Netscape or Microsoft.
Netscape's JavaScript Site Or Microsoft's Script site
|