Hi,
sorry that I came accross that way. I just jumped straight to the forum rather thinking about it...
Thank you for your examples and help but its not quite what I'm looking for..
So I have had a play around with the examples and snippets of code and this what i have so far:
Code:
<html>
<head>
<script type="text/javascript">
// (c) Splash Work Animations 2010.
calculate = function(){
var total = 0
//Get Package values + add to total
if(document.getElementById('started').checked == true)
{total=total + document.getElementById('started').value}
if(document.getElementById('small').checked == true)
{total=total + document.getElementById('small').value}
if(document.getElementById('large').checked == true)
{total=total + document.getElementById('large').value}
//Get addon values + add to total
if(document.getElementById('domain').checked == true)
{total=total + document.getElementById('domain').value}
if(document.getElementById('privacy').checked == true)
{total=total + document.getElementById('privacy').value}
if(document.getElementById('dedicated').checked == true)
{total=total + document.getElementById('dedicated').value}
if(document.getElementById('shell').checked == true)
{total=total + document.getElementById('shell').value}
if(document.getElementById('backup').checked == true)
{total=total + document.getElementById('backup').value}
if(document.getElementById('ssl').checked == true)
{total=total + document.getElementById('ssl').value}
document.getElementById(totalboxid).innerHTML = total
}
</script>
</head>
<body>
<p>Choose the type of business you have to see more information on what its for and the prices.</p>
<p><form>
<input type="checkbox" value="200" id="started" onclick="calculate();" /> Getting Started
<input type="checkbox" value="500" id="small" onclick="calculate();" /> Small/Medium Business
<input type="checkbox" value="800" id="large" onclick="calculate();" /> Large Business</form></p>
<br />
<table width="100%" border="0">
<tr>
<td width="50%" id="extra" valign="top">
<h1>Add-ons</h1>
<form>
<p><input value="15" type="checkbox" onclick="calculate();" id="domain" />Add another domain (£15 per year) </p>
<p><input value="14" type="checkbox" onclick="calculate();" id="privacy" />Add domain privacy (£14 per year)</p>
<p><input value="18" type="checkbox" onclick="calculate();" id="dedicated"/>Dedicated IP (£18 per year)</p>
<p><input value="18" type="checkbox" onclick="calculate();" id="shell" />Shell Access (£18 per year)</p>
<p><input value="10" type="checkbox" onclick="calculate();" id="backup" />Daily Backup (£10 per year)</p>
<p><input value="45" type="checkbox" onclick="calculate();" id="ssl" />Private SSL Certificate (£45 per year) </p>
</form>
</td>
</tr>
</table>
<div id="totalboxid"></div>
</body>
</html>
For some reason it's not working, any ideas?