I made the following script to add several drop down selections to get a total and then place the total in the document.
Code works in IE, but not Netscape or Firefox?
Any idesa?
Yours,
Dale Rose
Code:
//Calculates the total of all selections
function GetTotal()
{
//get variables from form and makes them integers
var Ami = parseInt(document.voting.Ami.value);
var Brady = parseInt(document.voting.Brady.value);
var Chad = parseInt(document.voting.Chad.value);
var Chris = parseInt(document.voting.Chris.value);
var Eliza = parseInt(document.voting.Eliza.value);
var John_K = parseInt(document.voting.John_K.value);
var Julie = parseInt(document.voting.Julie.value);
var Lea = parseInt(document.voting.Lea.value);
var Leann = parseInt(document.voting.Leann.value);
var Lisa = parseInt(document.voting.Lisa.value);
var Rory = parseInt(document.voting.Rory.value);
var Scout = parseInt(document.voting.Scout.value);
var Travis = parseInt(document.voting.Travis.value);
var Twila = parseInt(document.voting.Twila.value);
//adds all variables together to get total
var Gtotal = Ami + Brady + Chad + Chris + Eliza + John_K + Julie + Lea + Leann + Lisa + Rory + Scout + Travis + Twila;
//makes the form element total equal to variable total
if (Gtotal >= 110) {alert('Total can not be more than 100!');};
else {document.voting.total.value = Gtotal};
}
Code works in IE, but not Netscape or Firefox?
Any idesa?
Yours,
Dale Rose