SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with javascript

    hey, i've been struggling with this problem for a long time now. I can't seem to get an alert showing the total i want to be alerted.
    Does anyone have some advise??
    Thanks in advance


    Code =
    HTML Code:
    <!DOCTYPE html>
    <html lang="nl">
    <head>
    <meta charset="utf-8">
    <title>Epic Computers</title>
    <link rel="stylesheet" type="text/css"
    href="csswebsite2.css">
    <script type="text/javascript">
    function berekening() {
    if (document.mijnForm.pckast1.value.checked) {
    	document.mijnForm.pckast1.value = "62.50";} else {document.mijnForm.pckast1.value = "0"}
    if (document.mijnForm.pckast2.checked) {
    	document.mijnForm.pckast2.value = "92.50";} else {document.mijnForm.pckast2.value = "0"}
    if (document.mijnForm.pckast3.checked) {
    	document.mijnForm.pckast3.value = "92.50";} else {document.mijnForm.pckast3.value = "0"}
    if (document.mijnForm.pckast4.checked) {
    	document.mijnForm.pckast4.value = "92.50";} else {document.mijnForm.pckast4.value = "0"}
    if (document.mijnForm.pckast5.checked) {
    	document.mijnForm.pckast5.value = "118.50";} else {document.mijnForm.pckast5.value = "0"}
    if (document.mijnForm.pckast6.checked) {
    	document.mijnForm.pckast6.value = "123.50";} else {document.mijnForm.pckast6.value = "0"}
    if (document.mijnForm.pckast7.checked) {
    	document.mijnForm.pckast7.value = "143.50";} else {document.mijnForm.pckast7.value = "0"}
    if (document.mijnForm.pckast8.checked) {
    	document.mijnForm.pckast8.value = "192.50";} else {document.mijnForm.pckast8.value = "0"}
    if (document.mijnForm.processor1.checked) {
    	document.mijnForm.processor1.value = "284";} else {document.mijnForm.processor1.value = "0"}
    if (document.mijnForm.processor2.checked) {
    	document.mijnForm.processor2.value = "483";} else {document.mijnForm.processor2.value = "0"}
    if (document.mijnForm.processor3.checked) {
    	document.mijnForm.processor3.value = "483";} else {document.mijnForm.processor3.value = "0"}
    if (document.mijnForm.processor4.checked) {
    	document.mijnForm.processor4.value = "783";} else {document.mijnForm.processor4.value = "0"}
    if (document.mijnForm.processor5.checked) {
    	document.mijnForm.processor5.value = "783";} else {document.mijnForm.processor5.value = "0"}
    if (document.mijnForm.cpucooler1.checked) {
    	document.mijnForm.cpucooler1.value = "62.50";} else {document.mijnForm.cpucooler1.value = "0"}
    if (document.mijnForm.cpucooler2.checked) {
    	document.mijnForm.cpucooler2.value = "112.50";} else {document.mijnForm.cpucooler2.value = "0"}
    if (document.mijnForm.ventilator1.checked) {
    	document.mijnForm.ventilator1.value = "99";} else {document.mijnForm.ventilator1.value = "0"}
    if (document.mijnForm.ventilator2.checked) {
    	document.mijnForm.ventilator2.value = "99";} else {document.mijnForm.ventilator2.value = "0"}
    if (document.mijnForm.ventilator3.checked) {
    	document.mijnForm.ventilator3.value = "99";} else {document.mijnForm.ventilator3.value = "0"}
    if (document.mijnForm.ventilator4.checked) {
    	document.mijnForm.ventilator4.value = "99";} else {document.mijnForm.ventilator4.value = "0"}
    if (document.mijnForm.ventilator5.checked) {
    	document.mijnForm.ventilator5.value = "0";} else {document.mijnForm.ventilator5.value = "0"}
    if (document.mijnForm.fancontrol1.checked) {
    	document.mijnForm.fancontrol1.value = "39";} else {document.mijnForm.fancontrol1.value = "0"}
    if (document.mijnForm.fancontrol2.checked) {
    	document.mijnForm.fancontrol2.value = "0";} else {document.mijnForm.fancontrol2.value = "0"}
    if (document.mijnForm.moederbord1.checked) {
    	document.mijnForm.moederbord1.value = "180";} else {document.mijnForm.moederbord1.value = "0"}
    if (document.mijnForm.moederbord2.checked) {
    	document.mijnForm.moederbord2.value = "180";} else {document.mijnForm.moederbord2.value = "0"}
    if (document.mijnForm.moederbord3.checked) {
    	document.mijnForm.moederbord3.value = "180";} else {document.mijnForm.moederbord3.value = "0"}
    if (document.mijnForm.moederbord4.checked) {
    	document.mijnForm.moederbord4.value = "244.80";} else {document.mijnForm.moederbord4.value = "0"}
    if (document.mijnForm.ram1.checked) {
    	document.mijnForm.ram1.value = "10";} else {document.mijnForm.ram1.value = "0"}
    if (document.mijnForm.ram2.checked) {
    	document.mijnForm.ram2.value = "10";} else {document.mijnForm.ram2.value = "0"}
    if (document.mijnForm.ram3.checked) {
    	document.mijnForm.ram3.value = "10";} else {document.mijnForm.ram3.value = "0"}
    if (document.mijnForm.ram4.checked) {
    	document.mijnForm.ram4.value = "10";} else {document.mijnForm.ram4.value = "0"}
    if (document.mijnForm.ram5.checked) {
    	document.mijnForm.ram5.value = "10";} else {document.mijnForm.ram5.value = "0"}
    if (document.mijnForm.ram6.checked) {
    	document.mijnForm.ram6.value = "10";} else {document.mijnForm.ram6.value = "0"}
    if (document.mijnForm.ram7.checked) {
    	document.mijnForm.ram7.value = "10";} else {document.mijnForm.ram7.value = "0"}
    if (document.mijnForm.ram8.checked) {
    	document.mijnForm.ram8.value = "10";} else {document.mijnForm.ram8.value = "0"}
    if (document.mijnForm.ram9.checked) {
    	document.mijnForm.ram9.value = "10";} else {document.mijnForm.ram9.value = "0"}
    if (document.mijnForm.videokaart1.checked) {
    	document.mijnForm.videokaart1.value = "10";} else {document.mijnForm.videokaart1.value = "0"}
    if (document.mijnForm.videokaart2.checked) {
    	document.mijnForm.videokaart2.value = "10";} else {document.mijnForm.videokaart2.value = "0"}
    if (document.mijnForm.videokaart3.checked) {
    	document.mijnForm.videokaart3.value = "10";} else {document.mijnForm.videokaart3.value = "0"}
    if (document.mijnForm.videokaart4.checked) {
    	document.mijnForm.videokaart4.value = "10";} else {document.mijnForm.videokaart4.value = "0"}
    if (document.mijnForm.videokaart5.checked) {
    	document.mijnForm.videokaart5.value = "10";} else {document.mijnForm.videokaart5.value = "0"}
    if (document.mijnForm.ssd1.checked) {
    	document.mijnForm.ssd1.value = "10";} else {document.mijnForm.ssd1.value = "0"}
    if (document.mijnForm.ssd2.checked) {
    	document.mijnForm.ssd2.value = "10";} else {document.mijnForm.ssd2.value = "0"}
    if (document.mijnForm.ssd3.checked) {
    	document.mijnForm.ssd3.value = "10";} else {document.mijnForm.ssd3.value = "0"}
    if (document.mijnForm.ssd4.checked) {
    	document.mijnForm.ssd4.value = "10";} else {document.mijnForm.ssd4.value = "0"}
    if (document.mijnForm.ssd5.checked) {
    	document.mijnForm.ssd5.value = "10";} else {document.mijnForm.ssd5.value = "0"}
    if (document.mijnForm.ssd6.checked) {
    	document.mijnForm.ssd6.value = "10";} else {document.mijnForm.ssd6.value = "0"}
    if (document.mijnForm.2hdd1.checked) {
    	document.mijnForm.2hdd1.value = "10";} else {document.mijnForm.2hdd1.value = "0"}
    if (document.mijnForm.2hdd2.checked) {
    	document.mijnForm.2hdd2.value = "10";} else {document.mijnForm.2hdd2.value = "0"}
    if (document.mijnForm.2hdd3.checked) {
    	document.mijnForm.2hdd3.value = "10";} else {document.mijnForm.2hdd3.value = "0"}
    if (document.mijnForm.2hdd4.checked) {
    	document.mijnForm.2hdd4.value = "10";} else {document.mijnForm.2hdd4.value = "0"}
    if (document.mijnForm.3hdd1.checked) {
    	document.mijnForm.3hdd2.value = "10";} else {document.mijnForm.3hdd1.value = "0"}
    if (document.mijnForm.3hdd2.checked) {
    	document.mijnForm.3hdd2.value = "10";} else {document.mijnForm.3hdd2.value = "0"}
    if (document.mijnForm.3hdd3.checked) {
    	document.mijnForm.3hdd3.value = "10";} else {document.mijnForm.3hdd3.value = "0"}
    if (document.mijnForm.3hdd4.checked) {
    	document.mijnForm.3hdd4.value = "10";} else {document.mijnForm.3hdd4.value = "0"}
    if (document.mijnForm.3hdd5.checked) {
    	document.mijnForm.3hdd5.value = "10";} else {document.mijnForm.3hdd5.value = "0"}	
    if (document.mijnForm.4hdd1.checked) {
    	document.mijnForm.4hdd1.value = "10";} else {document.mijnForm.4hdd1.value = "0"}
    if (document.mijnForm.4hdd2.checked) {
    	document.mijnForm.4hdd2.value = "10";} else {document.mijnForm.4hdd2.value = "0"}
    if (document.mijnForm.4hdd3.checked) {
    	document.mijnForm.4hdd3.value = "10";} else {document.mijnForm.4hdd3.value = "0"}
    if (document.mijnForm.4hdd4.checked) {
    	document.mijnForm.4hdd4.value = "10";} else {document.mijnForm.4hdd4.value = "0"}
    if (document.mijnForm.4hdd5.checked) {
    	document.mijnForm.4hdd5.value = "10";} else {document.mijnForm.4hdd5.value = "0"}
    if (document.mijnForm.raid0.checked) {
    	document.mijnForm.raid0.value = "10";} else {document.mijnForm.raid0.value = "0"}
    if (document.mijnForm.raid1.checked) {
    	document.mijnForm.raid1.value = "10";} else {document.mijnForm.raid1.value = "0"}
    if (document.mijnForm.raid2.checked) {
    	document.mijnForm.raid2.value = "10";} else {document.mijnForm.raid2.value = "0"}
    if (document.mijnForm.1opticaldrive1.checked) {
    	document.mijnForm.1opticaldrive1.value = "10";} else {document.mijnForm.1opticaldrive1.value = "0"}
    if (document.mijnForm.1opticaldrive2.checked) {
    	document.mijnForm.1opticaldrive2.value = "10";} else {document.mijnForm.1opticaldrive2.value = "0"}
    if (document.mijnForm.2opticaldrive1.checked) {
    	document.mijnForm.2opticaldrive1.value = "10";} else {document.mijnForm.2opticaldrive1.value = "0"}
    if (document.mijnForm.2opticaldrive2.checked) {
    	document.mijnForm.2opticaldrive2.value = "10";} else {document.mijnForm.2opticaldrive2.value = "0"}
    if (document.mijnForm.2opticaldrive3.checked) {
    	document.mijnForm.2opticaldrive3.value = "10";} else {document.mijnForm.2opticaldrive3.value = "0"}
    if (document.mijnForm.2opticaldrive4.checked) {
    	document.mijnForm.2opticaldrive4.value = "10";} else {document.mijnForm.2opticaldrive4.value = "0"}
    if (document.mijnForm.cable1.checked) {
    	document.mijnForm.cable1.value = "10";} else {document.mijnForm.cable1.value = "0"}
    if (document.mijnForm.cable2.checked) {
    	document.mijnForm.cable2.value = "10";} else {document.mijnForm.cable2.value = "0"}
    if (document.mijnForm.cable3.checked) {
    	document.mijnForm.cable3.value = "10";} else {document.mijnForm.cable3.value = "0"}
    if (document.mijnForm.power1.checked) {
    	document.mijnForm.power1.value = "10";} else {document.mijnForm.power1.value = "0"}
    if (document.mijnForm.power2.checked) {
    	document.mijnForm.power2.value = "10";} else {document.mijnForm.power2.value = "0"}
    if (document.mijnForm.power3.checked) {
    	document.mijnForm.power3.value = "10";} else {document.mijnForm.power3.value = "0"}
    if (document.mijnForm.cable11.checked) {
    	document.mijnForm.cable11.value = "10";} else {document.mijnForm.cable11.value = "0"}
    if (document.mijnForm.cable12.checked) {
    	document.mijnForm.cable12.value = "10";} else {document.mijnForm.cable12.value = "0"}
    if (document.mijnForm.cable13.checked) {
    	document.mijnForm.cable13.value = "10";} else {document.mijnForm.cable13.value = "0"}
    if (document.mijnForm.cable14.checked) {
    	document.mijnForm.cable14.value = "10";} else {document.mijnForm.cable14.value = "0"}
    if (document.mijnForm.cable15.checked) {
    	document.mijnForm.cable15.value = "10";} else {document.mijnForm.cable15.value = "0"}
    if (document.mijnForm.sound1.checked) {
    	document.mijnForm.sound1.value = "10";} else {document.mijnForm.sound1.value = "0"}
    if (document.mijnForm.sound2.checked) {
    	document.mijnForm.sound2.value = "10";} else {document.mijnForm.sound2.value = "0"}
    if (document.mijnForm.sound3.checked) {
    	document.mijnForm.sound3.value = "10";} else {document.mijnForm.sound3.value = "0"}
    if (document.mijnForm.sound4.checked) {
    	document.mijnForm.sound4.value = "10";} else {document.mijnForm.sound4.value = "0"}
    if (document.mijnForm.sound5.checked) {
    	document.mijnForm.sound5.value = "10";} else {document.mijnForm.sound5.value = "0"}
    if (document.mijnForm.wifi1.checked) {
    	document.mijnForm.wifi1.value = "10";} else {document.mijnForm.wifi1.value = "0"}
    if (document.mijnForm.wifi2.checked) {
    	document.mijnForm.wifi2.value = "10";} else {document.mijnForm.wifi2.value = "0"}
    if (document.mijnForm.wifi3.checked) {
    	document.mijnForm.wifi3.value = "10";} else {document.mijnForm.wifi3.value = "0"}
    if (document.mijnForm.wifi4.checked) {
    	document.mijnForm.wifi4.value = "10";} else {document.mijnForm.wifi4.value = "0"}
    if (document.mijnForm.wifi5.checked) {
    	document.mijnForm.wifi5.value = "10";} else {document.mijnForm.wifi5.value = "0"}
    if (document.mijnForm.os1.checked) {
    	document.mijnForm.os1.value = "10";} else {document.mijnForm.os1.value = "0"}
    if (document.mijnForm.os2.checked) {
    	document.mijnForm.os2.value = "10";} else {document.mijnForm.os2.value = "0"}
    if (document.mijnForm.os3.checked) {
    	document.mijnForm.os3.value = "10";} else {document.mijnForm.os3.value = "0"}
    if (document.mijnForm.os4.checked) {
    	document.mijnForm.os4.value = "10";} else {document.mijnForm.os4.value = "0"}
    if (document.mijnForm.os5.checked) {
    	document.mijnForm.os5.value = "10";} else {document.mijnForm.os5.value = "0"}
    if (document.mijnForm.os6.checked) {
    	document.mijnForm.os6.value = "10";} else {document.mijnForm.os6.value = "0"}
    if (document.mijnForm.windowsoptimisation1.checked) {
    	document.mijnForm.windowsoptimisation1.value = "10";} else {document.mijnForm.windowsoptimisation1.value = "0"}
    if (document.mijnForm.windowsoptimisation2.checked) {
    	document.mijnForm.windowsoptimisation2.value = "10";} else {document.mijnForm.windowsoptimisation2.value = "0"}
    	
    	
    	
     var "totaal"= 
    parseFloat(document.mijnForm.pckast1.value) + 
    parseFloat(document.mijnForm.pckast2.value) + 
    parseFloat(document.mijnForm.pckast3.value) + 
    parseFloat(document.mijnForm.pckast4.value) + 
    parseFloat(document.mijnForm.pckast5.value) + 
    parseFloat(document.mijnForm.pckast6.value) + 
    parseFloat(document.mijnForm.pckast7.value) + 
    parseFloat(document.mijnForm.pckast8.value) + 
    parseFloat(document.mijnForm.processor1.value) +
    parseFloat(document.mijnForm.processor2.value) + 
    parseFloat(document.mijnForm.processor3.value) + 
    parseFloat(document.mijnForm.processor4.value) + 
    parseFloat(document.mijnForm.processor5.value) + 
    parseFloat(document.mijnForm.cpucooler1.value) + 
    parseFloat(document.mijnForm.cpucooler2.value) + 
    parseFloat(document.mijnForm.ventilator1.value) + 
    parseFloat(document.mijnForm.ventilator2.value) + 
    parseFloat(document.mijnForm.ventilator3.value) + 
    parseFloat(document.mijnForm.ventilator4.value) + 
    parseFloat(document.mijnForm.ventilator5.value) + 
    parseFloat(document.mijnForm.fancontrol1.value) + 
    parseFloat(document.mijnForm.fancontrol2.value) + 
    parseFloat(document.mijnForm.moederbord1.value) + 
    parseFloat(document.mijnForm.moederbord2.value) + 
    parseFloat(document.mijnForm.moederbord3.value) + 
    parseFloat(document.mijnForm.moederbord4.value) + 
    parseFloat(document.mijnForm.ram1.value) + 
    parseFloat(document.mijnForm.ram2.value) + 
    parseFloat(document.mijnForm.ram3.value) + 
    parseFloat(document.mijnForm.ram4.value) + 
    parseFloat(document.mijnForm.ram5.value) + 
    parseFloat(document.mijnForm.ram6.value) + 
    parseFloat(document.mijnForm.ram7.value) + 
    parseFloat(document.mijnForm.ram8.value) + 
    parseFloat(document.mijnForm.ram9.value) + 
    parseFloat(document.mijnForm.videokaart1.value) + 
    parseFloat(document.mijnForm.videokaart2.value) + 
    parseFloat(document.mijnForm.videokaart3.value) + 
    parseFloat(document.mijnForm.videokaart4.value) + 
     parseFloat(document.mijnForm.videokaart5.value) + 
     parseFloat(document.mijnForm.ssd1.value) + 
     parseFloat(document.mijnForm.ssd2.value) + 
     parseFloat(document.mijnForm.ssd3.value) + 
     parseFloat(document.mijnForm.ssd4.value) + 
     parseFloat(document.mijnForm.ssd5.value) + 
     parseFloat(document.mijnForm.ssd6.value) + 
     parseFloat(document.mijnForm.2hdd1.value) + 
     parseFloat(document.mijnForm.2hdd2.value) + 
     parseFloat(document.mijnForm.2hdd3.value) + 
     parseFloat(document.mijnForm.2hdd4.value) + 
     parseFloat(document.mijnForm.3hdd1.value) + 
     parseFloat(document.mijnForm.3hdd2.value) + 
     parseFloat(document.mijnForm.3hdd3.value) + 
     parseFloat(document.mijnForm.3hdd4.value) + 
     parseFloat(document.mijnForm.3hdd5.value) + 
     parseFloat(document.mijnForm.4hdd1.value) + 
     parseFloat(document.mijnForm.4hdd2.value) + 
     parseFloat(document.mijnForm.4hdd3.value) + 
     parseFloat(document.mijnForm.4hdd4.value) + 
     parseFloat(document.mijnForm.4hdd5.value) + 
     parseFloat(document.mijnForm.raid0.value) + 
     parseFloat(document.mijnForm.raid1.value) + 
     parseFloat(document.mijnForm.raid2.value) + 
     parseFloat(document.mijnForm.1opticaldrive1.value) + 
     parseFloat(document.mijnForm.1opticaldrive2.value) + 
     parseFloat(document.mijnForm.2opticaldrive1.value) + 
     parseFloat(document.mijnForm.2opticaldrive2.value) + 
     parseFloat(document.mijnForm.2opticaldrive3.value) + 
     parseFloat(document.mijnForm.2opticaldrive4.value) + 
     parseFloat(document.mijnForm.cable1.value) + 
     parseFloat(document.mijnForm.cable2.value) + 
     parseFloat(document.mijnForm.cable3.value) + 
     parseFloat(document.mijnForm.power1.value) + 
     parseFloat(document.mijnForm.power2.value) + 
     parseFloat(document.mijnForm.power3.value) + 
     parseFloat(document.mijnForm.cable11.value) + 
     parseFloat(document.mijnForm.cable12.value) + 
     parseFloat(document.mijnForm.cable13.value) + 
     parseFloat(document.mijnForm.cable14.value) + 
     parseFloat(document.mijnForm.cable15.value) + 
     parseFloat(document.mijnForm.sound1.value) + 
     parseFloat(document.mijnForm.sound2.value) + 
     parseFloat(document.mijnForm.sound3.value) + 
     parseFloat(document.mijnForm.sound4.value) +  
     parseFloat(document.mijnForm.sound5.value) + 
     parseFloat(document.mijnForm.wifi1.value) + 
     parseFloat(document.mijnForm.wifi2.value) + 
     parseFloat(document.mijnForm.wifi3.value) + 
     parseFloat(document.mijnForm.wifi4.value) + 
     parseFloat(document.mijnForm.wifi5.value) + 
     parseFloat(document.mijnForm.os1.value) + 
     parseFloat(document.mijnForm.os2.value) + 
     parseFloat(document.mijnForm.os3.value) + 
     parseFloat(document.mijnForm.os4.value) + 
     parseFloat(document.mijnForm.os5.value) + 
     parseFloat(document.mijnForm.os6.value) + 
     parseFloat(document.mijnForm.windowsoptimisation1.value) + 
     parseFloat(document.mijnForm.windowsoptimisation2.value);
    alert (totaal);
    }	
    </script>
    </head>
    <body>
    <header>
    
    	<br>
    	<b>EPIC COMPUTERS</b>
    </header>
    <nav>
    	<ul>
    		<li><a href="Home2.html">Home</a></li>
    		<li><a href="Computer2.html">Computers</a></li>
    		<li><a href="About2.html">About</a></li>
    		<li><a href="Contact2.html">Contact</a></li>
    	</ul>
    	<br>
    </nav>
    <br>
    <section id="sidemenu">
    	<ul>
    		<li><a href="#">Budget game computers</a></li>
    		<li><a href="#">Medium game computers</a></li>
    		<li><a href="#">Zware game computers</a></li>
    		<li><a href="pcbouwen.html">Bouw je eigen pc!</a></li>
    	</ul>
    </section>
    <br>
    <section id="bouwen1">
    	<form name="mijnForm">
    		<br>
    		<h1>Bouw je eigen PC</h1>
    		<br>
    		<p>Klik op de gewenste onderdelen om deze te instaleren in jouw computer</p>
    		<article>
    		<input type="checkbox" id="pckast1"> 
    		Corsair Carbide 300R Midi Tower Case
    		<br>
    		<br>
    		<img src="pckast1.jpg"/>
    		<br>
    		<input type="checkbox" id="pckast2"> 
    		Corsair Vengeance C70 Midi Tower Case - White
    		<br>
    		<br>
    		<img src="pckast2.jpg"/>
    		<br>
    		<input type="checkbox" id="pckast3"> 
    		Corsair Vengeance C70 Midi Tower Case - Black
    		<br>
    		<br>
    		<img src="pckast3.jpg"/>
    		<br>
    		<input type="checkbox" id="pckast4"> 
    		Corsair Vengeance C70 Midi Tower Case - Military Green
    		<br>
    		<br>
    		<img src="pckast4.jpg"/>
    		<br>
    		<input type="checkbox" id="pckast5"> 
    		Corsair Graphite 600T Midi Tower Case
    		<br>
    		<br>
    		<img src="pckast5.jpg"/>
    		<br>
    		<input type="checkbox" id="pckast6"> 
    		Corsair Graphite 600T Midi Tower Case in white
    		<br>
    		<br>
    		<img src="pckast6.jpg"/>
    		<br>
    		<input type="checkbox" id="pckast7"> 
    		<br>
    		<img src="pckast7.jpg"/>
    		Corsair Obsidian 650D Midi Tower Case
    		<br>
    		<br>
    		<input type="checkbox" id="pckast8"/> 
    		Corsair Obsidian 800D Full Tower Case
    		<br>
    		<br>
    		<img src="pckast8.jpg">
    		<br>
    		<input type="checkbox" id="processor1"> 
    		Intel Core i7 3820 4-cored Processor (Overclocked to up to 4.2GHz)
    		<br>
    		<br>
    		<img src="processor.gif"/>
    		<br>
    		<input type="checkbox" id="processor2">
    		Intel Core i7 3930K 6-cored Processor 3.2GHz (Overclocked to up to 4.7GHz)		
    		<br>
    		<br>
    		<img src="processor.gif"/>
    		<br>
    		<input type="checkbox" id="processor3"> 
    		Intel Core i7 3930K 6-cored Processor 3.2GHz (No Overclocking)
    		<br>
    		<br>
    		<img src="processor.gif"/>
    		<br>
    		<input type="checkbox" id="processor4"> 
    		Intel Core i7 3960X 6-cored Processor 3.3GHz (No Overclocking)
    		<br>
    		<br>
    		<img src="processor.gif"/>
    		<br>
    		<input type="checkbox" id="processor5"> 
    		Intel Core i7 3960X 6-cored Processor 3.3GHz (Overclocked to up to 4.5GHz)
    		<br>
    		<br>
    		<img src="processor.gif"/>
    		<br>
    		<input type="checkbox" id="cpucooler1"> 
    		<br>
    		<img src="cpucooler1.png"/>
    		<br>
    		<input type="checkbox" id="cpucooler2"> 
    		<br>
    		<img src="cpucooler2.png"/>
    		<br>
    		<input type="checkbox" id="ventilator1"> 
    		<br>
    		<img src="ventilator1.png"/>
    		<br>
    		<input type="checkbox" id="ventilator2"> 
    		<br>
    		<img src="ventilator2.png"/>
    		<br>
    		<input type="checkbox" id="ventilator3"> 
    		<br>
    		<img src="ventilator3.png"/>
    		<br>
    		<input type="checkbox" id="ventilator4"> 
    		<br>
    		<img src="ventilator4.png"/>
    		<br>
    		<input type="checkbox" id="ventilator5"> 
    		<br>
    		<input type="checkbox" id="fancontrol1"> 
    		<br>
    		<img src="fancontrol.png"/>
    		<br>
    		<input type="checkbox" id="fancontrol2"> 
    		<br>
    		<input type="checkbox" id="moederbord1"> 
    		<br>
    		<img src="moederbord1.jpg"/>
    		<br>
    		<input type="checkbox" id="moederbord2"> 
    		<br>
    		<img src="moederbord2.jpg"/>
    		<br>
    		<input type="checkbox" id="moederbord3"> 
    		<br>
    		<img src="moederbord3.jpg"/>
    		<br>
    		<input type="checkbox" id="moederbord4"> 
    		<br>
    		<img src="moederbord4.gif"/>
    		<br>
    		<input type="checkbox" id="ram1"> 
    		<br>
    		<img src="ram1.png"/>
    		<br>
    		<input type="checkbox" id="ram2"> 
    		<br>
    		<img src="ram2.png"/>
    		<br>
    		<input type="checkbox" id="ram3"> 
    		<br>
    		<img src="ram3.png"/>
    		<br>
    		<input type="checkbox" id="ram4"> 
    		<br>
    		<img src="ram4.png"/>
    		<br>
    		<input type="checkbox" id="ram5"> 
    		<br>
    		<img src="ram5.png"/>
    		<br>
    		<input type="checkbox" id="ram6"> 
    		<br>
    		<img src="ram6.png"/>
    		<br>
    		<input type="checkbox" id="ram7"> 
    		<br>
    		<img src="ram7.png"/>
    		<br>
    		<input type="checkbox" id="ram8"> 
    		<br>
    		<img src="ram8.png"/>
    		<br>
    		<input type="checkbox" id="ram9"> 
    		<br>
    		<img src="ram9.png"/>
    		<br>
    		<input type="checkbox" id="videokaart1"> 
    		<br>
    		<img src="videokaart1.jpg"/>
    		<br>
    		<input type="checkbox" id="videokaart2"> 
    		<br>
    		<img src="videokaart2.jpg"/>
    		<br>
    		<input type="checkbox" id="videokaart3"> 
    		<br>
    		<img src="videokaart3.jpg"/>
    		<br>
    		<input type="checkbox" id="videokaart4"> 
    		<br>
    		<img src="videokaart4.jpg"/>
    		<br>
    		<input type="checkbox" id="videokaart5"> 
    		<br>
    		<img src="videokaart5.jpg"/>
    		<br>
    		<input type="checkbox" id="ssd1"> 
    		<br>
    		<img src="ssd1.jpg"/>
    		<br>
    		<input type="checkbox" id="ssd2"> 
    		<br>
    		<img src="ssd2.jpg"/>
    		<br>
    		<input type="checkbox" id="ssd3"> 
    		<br>
    		<img src="ssd3.jpg"/>
    		<br>
    		<input type="checkbox" id="ssd4"> 
    		<br>
    		<img src="ssd4.jpg"/>
    		<br>
    		<input type="checkbox" id="ssd5"> 
    		<br>
    		<img src="ssd5.png"/>
    		<br>
    		<input type="checkbox" id="ssd6"> 
    		<br>
    		<img src="ssd6.jpg"/>
    		<br>
    		<input type="checkbox" id="2hhd1"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="2hhd2"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="2hhd3"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="2hhd4"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="3hhd1"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="3hhd2"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="3hhd3"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="3hhd4"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="3hhd5"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="4hdd1"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="4hdd2"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="4hdd3"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="4hdd4"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="4hdd5"> 
    		<br>
    		<img src="hdd.png"/>
    		<br>
    		<input type="checkbox" id="raid0"> 
    		<br>
    		<img src="raid.jpg"/>
    		<br>
    		<input type="checkbox" id="raid1"> 
    		<br>
    		<img src="raid.jpg"/>
    		<br>
    		<input type="checkbox" id="raid2"> 
    		<br>
    		<input type="checkbox" id="1opticaldrive1"> 
    		<br>
    		<img src="opticaldrive1.gif"/>
    		<br>
    		<input type="checkbox" id="1opticaldrive2"> 
    		<br>
    		<img src="opticaldrive2.jpg"/>
    		<br>
    		<input type="checkbox" id="2opticaldrive1"> 
    		<br>
    		<img src="opticaldrive1.gif"/>
    		<br>
    		<input type="checkbox" id="2opticaldrive2"> 
    		<br>
    		<img src="opticaldrive2.jpg"/>
    		<br>
    		<input type="checkbox" id="2opticaldrive3"> 
    		<br>
    		<img src="opticaldrive3.jpg"/>
    		<br>
    		<input type="checkbox" id="2opticaldrive4"> 
    		<br>
    		<input type="checkbox" id="cable1"> 
    		<br>
    		<img src="cable1.jpg"/>
    		<br>
    		<input type="checkbox" id="cable2"> 
    		<br>
    		<img src="cable2.jpg"/>
    		<br>
    		<input type="checkbox" id="cable3"> 
    		<br>
    		<img src="cable3.jpg"/>
    		<br>
    		<input type="checkbox" id="power1"> 
    		<br>
    		<img src="power1.jpg"/>
    		<br>
    		<input type="checkbox" id="power2"> 
    		<br>
    		<img src="power2.png"/>
    		<br>
    		<input type="checkbox" id="power3"> 
    		<br>
    		<img src="power3.jpg"/>
    		<br>
    		<input type="checkbox" id="cable11"> 
    		<br>
    		<img src="cable11.png"/>
    		<br>
    		<input type="checkbox" id="cable12"> 
    		<br>
    		<img src="cable12.png"/>
    		<br>
    		<input type="checkbox" id="cable13"> 
    		<br>
    		<img src="cable13.png"/>
    		<br>
    		<input type="checkbox" id="cable14"> 
    		<br>
    		<img src="cable14.png"/>
    		<br>
    		<input type="checkbox" id="cable15"> 
    		<br>
    		<input type="checkbox" id="sound1"> 
    		<br>
    		<img src="sound1.jpg"/>
    		<br>
    		<input type="checkbox" id="sound2"> 
    		<br>
    		<img src="sound2.jpg"/>
    		<br>
    		<input type="checkbox" id="sound3"> 
    		<br>
    		<img src="sound3.png"/>
    		<br>
    		<input type="checkbox" id="sound4"> 
    		<br>
    		<img src="sound4.jpg"/>
    		<br>
    		<input type="checkbox" id="sound5"> 
    		<br>
    		<img src="sound5.jpg"/>
    		<br>
    		<input type="checkbox" id="wifi1"> 
    		<br>
    		<img src="wifi1.jpg"/>
    		<br>
    		<input type="checkbox" id="wifi2"> 
    		<br>
    		<img src="wifi2.jpg"/>
    		<br>
    		<input type="checkbox" id="wifi3"> 
    		<br>
    		<img src="wifi3.gif"/>
    		<br>
    		<input type="checkbox" id="wifi4"> 
    		<br>
    		<img src="wifi4.jpg"/>
    		<br>
    		<input type="checkbox" id="wifi5"> 
    		<br>
    		<br>
    		<input type="checkbox" id="os1"> 
    		<br>
    		<img src=".os1jpg"/>
    		<br>
    		<input type="checkbox" id="os2"> 
    		<br>
    		<img src=".os2jpg"/>
    		<br>
    		<input type="checkbox" id="os3"> 
    		<br>
    		<img src=".os3jpg"/>
    		<br>
    		<input type="checkbox" id="os4"> 
    		<br>
    		<img src=".os4jpg"/>
    		<br>
    		<input type="checkbox" id="os5"> 
    		<br>
    		<img src=".os5jpg"/>
    		<br>
    		<input type="checkbox" id="os6"> 
    		<br>
    		<img src="os6.jpg"/>
    		<br>
    		<input type="checkbox" id="windowsoptimisation1"> 
    		<br>
    		<img src="windowsoptimisation.jpg"/>
    		<br>
    		<input type="checkbox" id="windowsoptimisation2"> 
    		<br>
    		
    		<input type="button" value="Totaal" onClick="berekening();">
    	</form>
    </section>
    </body>
    </html>
    Last edited by cpradio; Apr 4, 2013 at 08:02. Reason: Added code tags

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,189
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The problem is this line in your code.

    Code:
    var "totaal"=
    You have double quotes wrapping the variable name which will cause a syntax error, it needs to be

    Code JavaScript:
    var totaal =

    Also your above code is quote verbose, you could easily cut a huge chunk of it out by re-factoring all your IF and parseFloat statements into array so only the field names are specified instead of all the code you currently have.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •