PDA

View Full Version : my variable does not show the value and the code does not work in Firefox !



sanji
11-17-2008, 04:36 AM
:confused:



<html>

<head>



<body bgcolor="#ffffff">
<script type="text/javascript" language="javascript">
function calcCost()
{
var txt;
var sum=0;

for (i=1;i<=8;i=i+1)
{
for(j=1;j<=6;j=j+1)
{
txt='';
txt="date"+i+j;
if(document.getElementById(txt).checked)
sum=eval(sum)+eval(document.getElementById(txt).value);
//alert(sum);

}
}
document.getElementById("answer").value=sum;
}
</script>

<center>
<valign ="middle">

<table col width ="752" height="620">

<tr height ="620">
<td width ="2" height="620"></td>
<td width="750" height="620" valign="center" align="center" xpos="2">
<!--#include file="includefiles/header.asp"-->
<table border ="0" cellpadding="0" width="733" height="600">
<tr>
<td width="141" valign ="top" align ="center">
<!--#include file="includefiles/menu.asp"--></td>
<td valign="middle" align="center" bgcolor="#ffffff">

<form>
<h2 align="center" style="text-align:center">
<span style ="color:#00B050">

Holiday Camps
</span> </h2><b> Classes are from 9:00AM-5:30 PM
</b>
</form>

<form action="https://orderform.jsp" method="post">
<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> 2D Video Game Design </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">
Design a basic video game on the computer
and sound.</p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>

<p> 12/22/08

<input type="checkbox" name="date11" value="0" onClick ="date11.value=(119) ;">

12/23/08

<input type="checkbox" name="date12" value="0" onClick="date12.value=(119);" >

12/29/08

<input type="checkbox" name="date13" value="0" onClick="date13.value=(119);">

<p>12/30/08

<input type="checkbox" name="date14" value="0" onClick="date14.value=(119);">

12/31/08

<input type="checkbox" name="date15" value="0" onClick="date15.value=(119);">

01/02/08

<input type="checkbox" name="date16" value="0" onClick="date16.value=(119);" >

<br />

<p>

<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> 3D Video Game Design </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">
Take your child's skills to the next level with our 3D game programming course.
</p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>

<p> 12/22/08

<input type="checkbox" name="date21" value="0" onClick ="date21.value=(119) ;">

12/23/08

<input type="checkbox" name="date22" value="0" onClick="date22.value=(119);" >

12/29/08

<input type="checkbox" name="date23" value="0" onClick="date23.value=(119);">
<p>
12/30/08

<input type="checkbox" name="date24" value="0" onClick="date24.value=(119);">

12/31/08

<input type="checkbox" name="date25" value="0" onClick="date25.value=(119);">

01/02/08

<input type="checkbox" name="date26" value="0" onClick="date26.value=(119);" >

<br />

<p>
<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> Digital Art and Animation </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">
Our class </p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>

<p> 12/22/08

<input type="checkbox" name="date31" value="0" onClick ="date31.value=(119) ;">

12/23/08

<input type="checkbox" name="date32" value="0" onClick="date32.value=(119);" >

12/29/08

<input type="checkbox" name="date33" value="0" onClick="date33.value=(119);">

<p>12/30/08

<input type="checkbox" name="date34" value="0" onClick="date34.value=(119);">

12/31/08

<input type="checkbox" name="date35" value="0" onClick="date35.value=(119);">

01/02/08

<input type="checkbox" name="date36" value="0" onClick="date36.value=(119);" >

<br />

<p>

<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> Digital Darkroom </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">
Students will learn basic digital photo editing
</p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>

<p> 12/22/08

<input type="checkbox" name="date41" value="0" onClick ="date41.value=(119) ;">

12/23/08

<input type="checkbox" name="date42" value="0" onClick="date42.value=(119);" >

12/29/08

<input type="checkbox" name="date43" value="0" onClick="date43.value=(119);">

<p>12/30/08

<input type="checkbox" name="date44" value="0" onClick="date44.value=(119);">

12/31/08

<input type="checkbox" name="date45" value="0" onClick="date45.value=(119);">

01/02/08

<input type="checkbox" name="date46" value="0" onClick="date46.value=(119);" >

<br />
<p>

<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> Digital photography </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">
Explore your digital camera
</p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>
<p> 12/22/08

<input type="checkbox" name="date51" value="0" onClick ="date51.value=(119) ;">

12/23/08

<input type="checkbox" name="date52" value="0" onClick="date52.value=(119);" >

12/29/08

<input type="checkbox" name="date53" value="0" onClick="date53.value=(119);">

<p>12/30/08

<input type="checkbox" name="date54" value="0" onClick="date54.value=(119);">

12/31/08

<input type="checkbox" name="date55" value="0" onClick="date55.value=(119);">

01/02/08

<input type="checkbox" name="date56" value="0" onClick="date56.value=(119);" >

<br />

<p>
<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> Digital video Production </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">
Learn the basics of manual camera
</p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>

<p> 12/22/08

<input type="checkbox" name="date61" value="0" onClick ="date61.value=(119) ;">

12/23/08

<input type="checkbox" name="date62" value="0" onClick="date62.value=(119);" >

12/29/08

<input type="checkbox" name="date63" value="0" onClick="date63.value=(119);">

<p>12/30/08

<input type="checkbox" name="date64" value="0" onClick="date64.value=(119);">

12/31/08

<input type="checkbox" name="date65" value="0" onClick="date65.value=(119);">

01/02/08

<input type="checkbox" name="date66" value="0" onClick="date66.value=(119);" >

<br />

<p>
<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> Robotronix </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">

Program a(SumoBot)robot </p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>

<p> 12/22/08

<input type="checkbox" name="date71" value="0" onClick ="date71.value=(119) ;">

12/23/08

<input type="checkbox" name="date72" value="0" onClick="date72.value=(119);" >

12/29/08

<input type="checkbox" name="date73" value="0" onClick="date73.value=(119);">

<p>12/30/08

<input type="checkbox" name="date74" value="0" onClick="date74.value=(119);">

12/31/08

<input type="checkbox" name="date75" value="0" onClick="date75.value=(119);">

01/02/08

<input type="checkbox" name="date76" value="0" onClick="date76.value=(119);" >

<br />

<p>

<span style="font-size:12.0pt;font-family:calibri;color:black">
<b> Web Design with Animation </span> </b></p>
<span style="font-size:11.0pt;font-family:calibri;color:black" ><p align ="left">

Create a Web site
</p><p align="left">
<b>Tution Fee: $109 + $10 lab fee perday</p></b>

<p> 12/22/08

<input type="checkbox" name="date81" value="0" onClick ="date81.value=(119) ;">

12/23/08

<input type="checkbox" name="date82" value="0" onClick="date82.value=(119);" >

12/29/08

<input type="checkbox" name="date83" value="0" onClick="date83.value=(119);">

<p>12/30/08

<input type="checkbox" name="date84" value="0" onClick="date84.value=(119);">

12/31/08

<input type="checkbox" name="date85" value="0" onClick="date85.value=(119);">

01/02/08

<input type="checkbox" name="date86" value="0" onClick="date86.value=(119);" >

<br />



<INPUT TYPE="button" NAME="calculate" value="The total is: " onclick ="calcCost()">
<INPUT TYPE ="TEXT" Name ="answer"><p>

<input type="reset" value="Reset" onclick ="answer.value=(eval(0));">


<% Call InsertSignature(" ","usd", "sale") %>

<input type="hidden" name="orderPage_transactionType" value="sale">

<input type="hidden" name="merchantDefinedData1" value="2D Video Game Design">

<input type="hidden" name="merchantDefinedData2" value="answer.value">

<input type="submit" name="submit1" value="Buy Now"></p>








</form>

rangana
11-17-2008, 02:20 PM
Please wrap your codes inside the
tags.
Which var isn't showing?
What's wrong with firefox?

Please be detailed with your problem.