gdogfunk
07-18-2008, 08:15 PM
Hello,
I'm new to this forum and have been working on this all day. I jumped for joy when I finally got it working...until I tested it on the IE6 on the PC (which is the intended audience).
Below is my code. The first script works great as expected on FF and IE, but the bottom script with the math won't work at all on IE. Any ideas on how I might get it working? I simply need to add 3 fields and check to make sure they are 8 or less and if not, display the alert.
I've searched and searched and I have tried changing the script type, etc, with no luck. I'm hoping this is a simple fix.
I appreciate all help in advance!
Thanks!
Ryan
<script LANGUAGE="JavaScript">
<!--
function checkCheckBoxes() {
if (document.frm.terms.checked == false)
{
alert ('You did not read the acceptence terms, please try again!');
return false;
}
else
{
return true;
}
}
//-->
</script>
<script>
<!--
window.onkeyup=calcNow;
function calcNow() {
calcIT(document.frm.employee.value, document.frm.children_tall.value, document.frm.children_short.value);
}
function calcIT(v,a,b) {
var total, v2, a2, b2;
v2 = parseFloat(v)
a2 = parseFloat(a)
b2 = parseFloat(b)
total = (v2 + a2 + b2);
document.frm.total_tickets.value = total;
if (document.frm.total_tickets.value >= 9)
{
alert ('You have entered too many tickets, please try again!');
return false;
}
else
{
return true;
}
}
// -->
</script>
I'm new to this forum and have been working on this all day. I jumped for joy when I finally got it working...until I tested it on the IE6 on the PC (which is the intended audience).
Below is my code. The first script works great as expected on FF and IE, but the bottom script with the math won't work at all on IE. Any ideas on how I might get it working? I simply need to add 3 fields and check to make sure they are 8 or less and if not, display the alert.
I've searched and searched and I have tried changing the script type, etc, with no luck. I'm hoping this is a simple fix.
I appreciate all help in advance!
Thanks!
Ryan
<script LANGUAGE="JavaScript">
<!--
function checkCheckBoxes() {
if (document.frm.terms.checked == false)
{
alert ('You did not read the acceptence terms, please try again!');
return false;
}
else
{
return true;
}
}
//-->
</script>
<script>
<!--
window.onkeyup=calcNow;
function calcNow() {
calcIT(document.frm.employee.value, document.frm.children_tall.value, document.frm.children_short.value);
}
function calcIT(v,a,b) {
var total, v2, a2, b2;
v2 = parseFloat(v)
a2 = parseFloat(a)
b2 = parseFloat(b)
total = (v2 + a2 + b2);
document.frm.total_tickets.value = total;
if (document.frm.total_tickets.value >= 9)
{
alert ('You have entered too many tickets, please try again!');
return false;
}
else
{
return true;
}
}
// -->
</script>