The following code is working quite well.I need a small change though.When i click the button the corresponding amount gets displayed in a text box,iam struggling to display the amount like a plain text.Any help would be appreciated.thank you.
<html>
<head>
<title>hello</title>
<script type="text/javascript">
function calculateTotal(frm){
var total = 0;
if (frm.tablesponsor[0].checked) {total = 600}
if (frm.tablesponsor[1].checked) {total = 100}
total = total * (frm.individualtickets.value);
total = total.toFixed(2);
frm.total.value = "$" + total;
}
</script></head>
<body>
<td height="392" colspan="3"><form id="form1" name="form1" method="get" action="">
<table width="800" border="0" align="left" cellpadding="7" cellspacing="0">
<tr>
<td colspan="7" valign="top"><div id="CollapsiblePanel1" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0">
<table width="800" height="19" border="0" cellpadding="7" cellspacing="0">
<tr>
<td width="116" valign="top">
Well i wrote this script and its doing fine.There are three quantity text boxes and as i select the quantity the price corresponding to the quantity gets added up.the help i need here is that i need to print the quantity of the three keys at the bottom ex:2 basic 3 pro 5 cor and the total price of all the three keys.Struggling a litle here any help, and i would be very thankful
Thank you
<code>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>AP3 - Encryption Redefined</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="ap3.css" type="text/css" rel="stylesheet" />
<link href="menu.css" type="text/css" rel="stylesheet" />
<link href="btn.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
function calculateTotal(frm){
var total = 0;
if (frm.tablesponsor[0].checked) {total = 100}
if (frm.tablesponsor[1].checked) {total = 200}
if (frm.tablesponsor[2].checked) {total = 300}
if (frm.tablesponsor[3].checked) {total = 400}
document.getElementById('divId1').innerHTML = "$" + total;
total = total * (frm.individualtickets.value);
total = total.toFixed(2);
document.getElementById('divId').innerHTML = "$" + total;
}
function calculateTotal1(frm){
var total = 0;
if (frm.tablesponsor1[0].checked) {total = 100}
if (frm.tablesponsor1[1].checked) {total = 200}
if (frm.tablesponsor1[2].checked) {total = 300}
if (frm.tablesponsor1[3].checked) {total = 400}
document.getElementById('divId2').innerHTML = "$" + total;
total = total * (frm.individualtickets1.value);
total = total.toFixed(2);
document.getElementById('divId3').innerHTML = "$" + total;
}
function calculateTotal2(frm){
var total = 0;
if (frm.tablesponsor2[0].checked) {total = 100}
if (frm.tablesponsor2[1].checked) {total = 200}
if (frm.tablesponsor2[2].checked) {total = 300}
if (frm.tablesponsor2[3].checked) {total = 400}
document.getElementById('divId4').innerHTML = "$" + total;
total = total * (frm.individualtickets2.value);
total = total.toFixed(2);
document.getElementById('divId5').innerHTML = "$" + total;
}