Jump to content
xisto Community
Sign in to follow this  
PlugComputers

Help With Javascript Calculator Returning "nan"

Recommended Posts

Hello all, thought maybe I could get a little help with a problem I was having with some Javascript on this forum.

I recently posted about adding some type of script to my page that calculated a customers custom computer system price by assigning each form option a dollar value. I have done so, with a script that seems like it would work, but am having some problems. I feel that I have the script correctly in place, but when the user selects their computer options a total of "NaN" returns at the bottom of the page.

You can see what I mean here: http://forums.xisto.com/no_longer_exists/
I only have dollar amounts applied to the "Processors" section, but it should work with just those values.

Here is the html of the page, check to see if I'm missing something obvious, or give me a reason why this isn't working out:

<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN""http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/ language="JavaScript" type="text/javascript"><!--Hide script from old browsersfunction newWindow(newContent) {  winContent = window.open(newContent, 'nextWin', 'right=0, top=20,width=650,height=775, toolbar=no,scrollbars=yes, resizable=no')		  } //Stop hiding script from old browsers -->  function submitForm() {		if(document.theForm.name.value.length < 1) {			alert("Please enter your name.");			document.theForm.name.focus();			return;		} else if(document.theForm.email.value.length < 4) {			alert("Please enter a valid e-mail address.");			document.theForm.email.focus();			return;		}		document.theForm.submit();	}</script><script language="JavaScript" type="text/javascript">function getTotal(){var form=document.theForm;var inputs=form.getElementsByTagName('input');var length=inputs.length;var total='0';for(i=0;i<length-1;i++){  if(inputs[i].type=='radio'){  var checked=inputs[i].checked?1:0;	if(checked){	var value=inputs[i].value.split("~~")[0];	total-=-value;	}  }}document.getElementById('totalspan').innerHTML="$"+totaltotal='1200';}</script><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><meta name="Description" content="Plug Computers specializes in hand made, custom, build to order computers. We consult with customers on their individual needs, helping them realize what they need in a computer, working togetherto create the highest quality gaming computers, small business machines, and high end video editing desktops."/><meta name="author" content="Jon Stewart"/><link rel="stylesheet" type="text/css" href="default.css"/><title>Plug Computers - Customize Your AMD Build</title></head><body bgcolor="#FFFFFF"><div class="main"><div class="gfx">   <h1><font color="#67696D"><strong><font size="+3" face="Trebuchet MS"><a href="http://forums.xisto.com/no_longer_exists/ 	Computers</a></font></strong><br />	<font size="4"><a href="http://forums.xisto.com/no_longer_exists/;  <h1 align="left"><font color="#67696D"> <br />	<br />	<font color="#999999" size="5"><strong>Schedule Your Build!</strong> </font></font></h1></div><div class="menu">   <div align="center"><a href="index.html"><strong>Home</strong></a> <a href="portfolio.html"> 	<strong>Portfolio</strong></a> <a href="schedule.php"><strong>Schedule Your 	Build!</strong></a><a href="newtechnology.html" id="last"><strong>New Technology</strong></a>   </div></div><div class="content"><div class="item">   <h1>Schedule Your AMD Build</h1>  <p>So you are interested in contacting Plug Computers to receive a consultations 	regarding a custom build for you or your business? Excellent. There are a 	few ways to go about doing so in order to make your experience the easiest. 	Every system we create has the ability to be 100% fully customized, but we 	recommend selecting components from the categories below in order for us to 	better understand your needs. <br />	<br />	Upon submitting your configuration to Plug Computers your build will be calculated 	and you will be emailed a quote for the computer you configured using this 	page. Although it is not final, it gives you a good sense of what your options 	are. <br />	<br />	<br />  </p>  <form action="L10FmX.php" method="post" name="theForm" id="theForm" onclick="getTotal() " form"form">	<input type="hidden" name="required" value="name,email" />	<h1>The Information filled out in this form is automatically emailed to a 	  Plug Computers Build specialist</h1>	<br />	Name: <br />	<input type="text" name="name" size="40" />	<br />	Email: <br />	<input type="text" name="email" size="40" />	<br />	Daytime Phone Number: (Optional) <br />	<input type="text" name="phonenumber" size="40" />	<br />	<br />	<br />	<h1>Starting here by customizing your computer to your liking. Upon submitting 	  your configuration to Plug Computers you will receive system details and 	  price quote. Please be aware that any selections here can be changed at 	  a later time if you wish.</h1>	<br />	<div class="item"> 	  <h1>Processor (CPU):</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('cpuhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="CPU" type="radio" checked="checked" value="10~~AMD x2 Dual Core 3800+" />	AMD X2 Socket AM2 Dual Core 3800+ at 2.0GHz with 2x512KB Cache [+0] <br />	<input name="CPU" type="radio" value="20~~AMD x2 Dual Core 4400+" />	AMD X2 Socket AM2 Dual Core 4400+ at 2.3GHz with 2x512KB Cache [+20]<br />	<input name="CPU" type="radio" value="40~~AMD x2 Dual Core 5000+" />	AMD X2 Socket AM2 Dual Core 5000+ at 2.6GHz with 2x512KB Cache [+40]<br />	<input name="CPU" type="radio" value="60~~AMD x2 Dual Core 5200+" />	AMD X2 Socket AM2 Dual Core 5200+ at 2.6Ghz with 2x1MB Cache [+60]<br />	<input name="CPU" type="radio" value="80~~AMD x2 Dual Core 5400+" />	AMD X2 Socket AM2 Dual Core 5400+ at 2.8Ghz with 2x512KB Cache [+80]<br />	<input name="CPU" type="radio" value="100~~AMD x2 Dual Core 5600+" />	AMD X2 Socket AM2 Dual Core 5600+ at 2.8Ghz with 2x1MB Cache [+100]<br />	<input name="CPU" type="radio" value="120~~AMD FX-62" />	AMD FX-62 Socket AM2 at 2.8GHz with 2x1MB Cache [+120] <br />	<br />	<div class="item"> 	  <h1>Operating System:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('oshelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="OperatingSystem" type="radio" checked="checked" value="Windows Vista Home Basic" />	Windows Vista Home Basic Edition <br />	<input name="OperatingSystem" type="radio" value="Windows Vista Home Premium" />	Windows Vista Home Premium Edition <br />	<input name="OperatingSystem" type="radio" value="Windows Vista Business" />	Windows Vista Business Edition <br />	<input name="OperatingSystem" type="radio" value="Windows Vista Ultimate" />	Windows Vista Ultimate Edition <br />	<input name="OperatingSystem" type="radio" value="Windows Vista Ultimate 64-bit" />	Windows Vista Ultimate 64-bit Edition <br />	<br />	<div class="item"> 	  <h1>Case:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('casehelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="Case" type="radio" checked="checked" value="Antec P180 Silver" />	Antec P180 Silver <br />	<input name="Case" type="radio" value="Asus Vento Black" />	Asus Vento Black <br />	<input name="Case" type="radio" value="Lian Li PC-V1000 Plus II Black" />	Lian Li PC-V1000 Plus II Black <br />	<input name="Case" type="radio" value="Lian Li PC-V1000 Plus II Silver" />	Lian Li PC-V1000 Plus II Silver <br />	<input name="Case" type="radio" value="Logisys Acrylic" />	Logisys Acrylic (Specify color below in "Case Lighting Upgrades") <br />	<input name="Case" type="radio" value="NZXT Lexa" />	NZXT Lexa <br />	<input name="Case" type="radio" value="Aspire XCruiser Black" />	Aspire X-Cruiser Black <br />	<input name="Case" type="radio" value="Thermaltake Kandalf Black" />	Thermaltake Kandalf Black <br />	<input name="Case" type="radio" value="Thermaltake Kandalf Silver" />	Thermaltake Kandalf Silver <br />	<input name="Case" type="radio" value="Coolermaster Stacker 830" />	Coolermaster Stacker 830 <br />	<input name="Case" type="radio" value="Other" />	Other (Please specify) 	<input name="OtherCase" type="text" size="40" />	<br />	<br />	<div class="item"> 	  <h1>Case Cooling Upgrades:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('coolingupgradehelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="CaseCoolingUpgrades" type="radio" value="Freezer 64 Pro Processor Cooler" />	Freezer 64 Pro Processor Cooler <br />	<input name="CaseCoolingUpgrades" type="radio" value="High Performance Chassis Cooling Fans" />	High Performance Chassis Cooling Fans <br />	<input name="CaseCoolingUpgrades" type="radio" value="Koolance Processor Liquid Cooling System" />	Koolance Processor Liquid Cooling System <br />	<input name="CaseCoolingUpgrades" type="radio" value="Koolance Complete Liquid Cooling System" />	Koolance Complete Liquid Cooling System (Processor, Video Cards, Hard Drive) 	<br />	<input name="CaseCoolingUpgrades" type="radio" checked="checked" value="None" />	None <br />	<br />	<div class="item"> 	  <h1>Case Lighting Upgrades:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('lightinghelp.html').html">Help 	  Me Choose</a></strong></font> </div>	<input name="CaseLightingUpgrades" type="radio" value="LED Colored Chassis Cooling Fans" />	LED Colored Chassis Cooling Fans (Specify color below) <br />	<input name="CaseLightingUpgrades" type="radio" value="2 12in Cold Cathode Case Lights" />	2 12" Cold Cathode Case Lights (Specify color below) <br />	<input name="CaseLightingUpgrades" type="radio" value="Complete Lighting Package - LED Cooling Fans and 4 12in Cold Cathode Case Lights" />	Complete Lighting Package - LED Cooling Fans and 4x12" Cold Cathode Case Lights 	(Specify color below) <br />	<input name="CaseLightingUpgrades" type="radio" checked="checked" value="None" />	None <br />	<br />	<strong>Please specify a color choice below:</strong> <br />	<input name="LightingUpgradeColor" type="radio" value="Blue" />	Blue <br />	<input name="LightingUpgradeColor" type="radio" value="Red" />	Red <br />	<input name="LightingUpgradeColor" type="radio" value="Orange" />	Orange <br />	<input name="LightingUpgradeColor" type="radio" value="Green" />	Green <br />	<input name="LightingUpgradeColor" type="radio" checked="checked" value="None" />	None <br />	<br />	<div class="item"> 	  <h1>Motherboard:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('motherboardhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="Motherboard" type="radio" checked="checked" value="EVGA 122-M2-NF59 Wireless with nForce chipset 590 and Socket AM2" />	EVGA 122-M2-NF59 Wireless with nForce chipset 590 and Socket AM2 <strong>SLI 	READY</strong><br />	<input name="Motherboard" type="radio" value="Asus M2N32-SLI Deluxe Wireless with nForce chipset 590 and Socket AM2" />	Asus M2N32-SLI Deluxe Wireless with nForce chipset 590 and Socket AM2 <strong>SLI 	READY</strong><br />	<input name="Motherboard" type="radio" value="Asus CROSSHAIR SLI with nForce chipset 590 and Socket AM2" />	Asus CROSSHAIR SLI with nForce chipset 590 and Socket AM2 <strong>SLI READY</strong> 	<br />	<br />	<div class="item"> 	  <h1>Memory:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('memoryhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="Memory" type="radio" checked="checked" value="1 GB (2x512MB) Corsair XMS DDR2 800" />	1 GB (2x512MB) Corsair XMS DDR2 800 <br />	<input name="Memory" type="radio" value="2 GB (2x1GB) Corsair XMS DDR2 800" />	<strong><font color="FFFFFF">Plug Recommended!</font></strong> 2 GB (2x1GB) 	Corsair XMS DDR2 800 <br />	<input name="Memory" type="radio" value="4 GB (4x1GB) Corsair XMS DDR2 800" />	4 GB (4x1GB) Corsair XMS DDR2 800 <br />	<input name="Memory" type="radio" value="4 GB (4x1GB) Corsair Dominator Series DDR2 800" />	4 GB (4x1GB) Corsair Dominator Series DDR2 800 <br />	<br />	<div class="item"> 	  <h1>Hard Drive:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('hddhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="HardDrive" type="radio" checked="checked" value="160GB Western Digital SATA 3GB/sec with 8MB Cache" />	160GB Western Digital SATA 3GB/sec with 8MB Cache <br />	<input name="HardDrive" type="radio" value="250GB Western Digital SATA 3GB/sec with 8MB Cache" />	250GB Western Digital SATA 3GB/sec with 8MB Cache <br />	<input name="HardDrive" type="radio" value="320GB Western Digital SATA 3GB/sec with 8MB Cache" />	320GB Western Digital SATA 3GB/sec with 8MB Cache <br />	<input name="HardDrive" type="radio" value="500GB Western Digital SATA 3GB/sec with 16MB Cache" />	500GB Western Digital SATA 3GB/sec with 16MB Cache <br />	<input name="HardDrive" type="radio" value="74GB Western Digital Raptor (10,000RPM) ATA150 with 16MB Cache" />	74GB Western Digital Raptor (10,000RPM) ATA150 with 16MB Cache <br />	<input name="HardDrive" type="radio" value="150GB Western Digital Raptor (10,000RPM) ATA150 with 16MB Cache" />	<strong><font color="FFFFFF">Plug Recommended!</font></strong> 150GB Western 	Digital Raptor (10,000RPM) ATA150 with 16MB Cache <br />	<br />	<div class="item"> 	  <h1>Additional Storage Drive:</h1>	</div>	<input name="StorageDrive" type="radio" value="250GB Western Digital SATA 3GB/sec with 8MB Cache" />	250GB Western Digital SATA 3GB/sec with 8MB Cache <br />	<input name="StorageDrive" type="radio" value="500GB Western Digital SATA 3GB/sec with 16MB Cache" />	500GB Western Digital SATA 3GB/sec with 16MB Cache <br />	<input name="StorageDrive" type="radio" value="74GB Western Digital Raptor (10,000RPM) ATA150 with 16MB Cache" />	74GB Western Digital Raptor (10,000RPM) ATA150 with 16MB Cache <br />	<input name="StorageDrive" type="radio" value="150GB Western Digital Raptor (10,000RPM) ATA150 with 16MB Cache" />	150GB Western Digital Raptor (10,000RPM) ATA150 with 16MB Cache <br />	<input name="StorageDrive" type="radio" value="750GB Seagate SATA 3GB/sec with 16MB Cache" />	750GB Seagate SATA 3GB/sec with 16MB Cache <br />	<input name="StorageDrive" type="radio" checked="checked" value="None" />	None <br />	<br />	<div class="item"> 	  <h1>CD/DVD Drive:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('opticalhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="CDDVDDrive" type="radio" checked="checked" value="18x DVDąR/ąRW Dual Layer" />	18x DVDąR/ąRW Dual Layer <br />	<input name="CDDVDDrive" type="radio" value="18x DVDąR/ąRW Dual Layer with Lightscribe" />	18x DVDąR/ąRW Dual Layer with Lightscribe<br />	<input name="CDDVDDrive" type="radio" value="20x DVDąR/ąRW Dual Layer with Lightscribe" />	20x DVDąR/ąRW Dual Layer with Lightscribe <br />	<input name="CDDVDDrive" type="radio" value="2x Phillips Blu-Ray DVD Burner" />	<strong><font color="FFFFFF">Burn 25GB Blu-Ray DVD's!</font></strong> 2x Phillips 	Blu-Ray DVD Combo Burner <br />	<br />	<div class="item"> 	  <h1>Additional CD/DVD Drive:</h1>	</div>	<input name="AdditionalCDDVDDrive" type="radio" value="16x DVD-ROM" />	16x DVD-ROM <br />	<input name="AdditionalCDDVDDrive" type="radio" value="18x DVDąR/ąRW Dual Layer" />	18x DVDąR/ąRW Dual Layer <br />	<input name="AdditionalCDDVDDrive" type="radio" value="18x DVDąR/ąRW Dual Layer with Lightscribe" />	18x DVDąR/ąRW Dual Layer with Lightscribe <br />	<input name="AdditionalCDDVDDrive" type="radio" value="20x DVDąR/ąRW Dual Layer with Lightscribe" />	20x DVDąR/ąRW Dual Layer with Lightscribe <br />	<input name="AdditionalCDDVDDrive" type="radio" checked="checked" value="None" />	None <br />	<br />	<div class="item"> 	  <h1>Floppy Drive:</h1>	</div>	<input name="FloppyDrive" type="radio" value="3.5in Floppy Disk Drive" />	3.5" Floppy Disk Drive <br />	<input name="FloppyDrive" type="radio" checked="checked" value="None" />	None <br />	<br />	<div class="item"> 	  <h1>Graphics Processing Unit (GPU):</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('gpuhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="GPU" type="radio" checked="checked" value="Geforce 7600GT" />	256MB nVidia Geforce 7600GT <br />	<input name="GPU" type="radio" value="Geforce 7950GT" />	512MB nVidia Geforce 7950GT <br />	<input name="GPU" type="radio" value="Geforce 8800GTS" />	<strong><font color="FFFFFF">Great Value</font></strong> 640MB nVidia Geforce 	8800GTS <br />	<input name="GPU" type="radio" value="Geforce 8800GTX" />	768MB nVidia Geforce 8800GTX <br />	<input name="GPU" type="radio" value="SLI Geforce 7950GT" />	DUAL nVidia Geforce 7950GT's (SLI Enabled - 750W Power Supply required) <br />	<input name="GPU" type="radio" value="SLI Geforce 8800GTS" />	DUAL nVidia Geforce 8800GTS's (SLI Enabled - 850W Power Supply required) <br />	<input name="GPU" type="radio" value="SLI Geforce 8800GTX" />	DUAL nVidia Geforce 8800GTX's (SLI Enabled - 850W Power Supply required) <br />	<br />	<div class="item"> 	  <h1>Power Supply:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('psuhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="PowerSupply" type="radio" checked="checked" value="Thermaltake 650W Toughpower" />	Thermaltake 650W Toughpower SLI Rated<br />	<input name="PowerSupply" type="radio" value="Thermaltake 750W Toughpower" />	Thermaltake 750W Toughpower SLI Rated <br />	<input name="PowerSupply" type="radio" value="Thermaltake 850W Toughpower" />	Thermaltake 850W Toughpower SLI Rated <strong><font color="FFFFFF">QUAD SLI 	Ready!</font></strong> <br />	<br />	<div class="item"> 	  <h1>Sound Card:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('soundcardhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="SoundCard" type="radio" checked="checked" value="High-Definition 7.1 Channel Audio - Integrated" />	High-Definition 7.1 Channel Audio - Integrated <br />	<input name="SoundCard" type="radio" value="Creative X-Fi XtremeGamer Fatal1ty" />	<strong><font color="FFFFFF">Plug Gaming Recommended!</font></strong> Creative 	X-Fi XtremeGamer Fatal1ty <br />	<input name="SoundCard" type="radio" value="Creative X-Fi ELITE" />	Creative X-Fi ELITE <br />	<br />	<div class="item"> 	  <h1>Monitor:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('monitorhelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="Monitor" type="radio" checked="checked" value="Samsung 720N Black 17in 8ms LCD" />	Samsung 720N Black 17" 8ms LCD <br />	<input name="Monitor" type="radio" value="Samsung 940N Black 19in 8ms LCD" />	Samsung 940N Black 19" 8ms LCD <br />	<input name="Monitor" type="radio" value="Samsung 931C Black 19in 2ms LCD" />	<strong><font color="FFFFFF">Plug Gaming Recommended!</font></strong> Samsung 	931C Black 19" 2ms LCD <br />	<input name="Monitor" type="radio" value="Samsung 225BW Black 22in 5ms Widescreen LCD" />	Samsung 225BW Black 22" 5ms Widescreen LCD <br />	<input name="Monitor" type="radio" value="Dell 24in Ultrasharp Widescreen LCD" />	Dell 24" Ultrasharp Widescreen LCD (This option may delay your shipping date)<br />	<input name="Monitor" type="radio" value="Dell 30in Ultrasharp Widescreen LCD" />	Dell 30" Ultrasharp Widescreen LCD (This option may delay your shipping date)<br />	<input name="Monitor" type="radio" value="None" />	None <br />	<br />	<div class="item"> 	  <h1>Keyboard/Mouse:</h1>	</div>	<div align="right"> <img src="help.jpg" width="20" height="20" /> <font size="2"><strong><a href="java script:newWindow('keyboardmousehelp.html')">Help 	  Me Choose</a></strong></font> </div>	<input name="KeyboardMouse" type="radio" checked="checked" value="Microsoft Standard Black Keyboard/Mouse Combo" />	Microsoft Standard Black Keyboard/Mouse Combo <br />	<input name="KeyboardMouse" type="radio" value="Logitech Black USB RF Wireless Standard Cordless Desktop with Laser Mouse" />	Logitech Black USB RF Wireless Standard Cordless Desktop with Laser Mouse 	<br />	<input name="KeyboardMouse" type="radio" value="Microsoft 2-Tone PS/2 Wireless Keyboard and Mouse IF Wireless" />	Microsoft 2-Tone PS/2 Wireless Keyboard and Mouse IF Wireless <br />	<input name="KeyboardMouse" type="radio" value="Microsoft Optical Elite Buletooth 2-Tone USB with Mouse" />	Microsoft Optical Elite Buletooth 2-Tone USB with Mouse <br />	<br />	<div class="item"> 	  <h1>Additional Requests:</h1>	</div>	Remeber, Plug Computers specializes in complete customization, if you would 	like to add something to your system not included above please indicate here.<br />	<center>	  <textarea name="AddiontalRequests" rows="5" cols="50">Insert Additional Requests Here...</textarea>	</center>  </form>  <br />  <br />  Remember, this is just a rough draft of a possible setup for your computer,   once a Plug Computers representative contacts you we will gain a better understanding   of what you are looking for in your machine. It isn't a problem if some fields   were left blank, we can help you make your decision later. <br />  <br />  <center>	<font color="FFFFFF">System base price is currently: </font><span id='totalspan'> 	</span><br />	Component selection upgrades are subject to system price change. <br />	<input type="button" name="submitBtn" value="Send" onclick="submitForm();" />	<input type="reset" value="Reset" />	</form>  </center>  <br />  <div class="item"> 	<h1>Other Information</h1>	<center>	  <table width="500" border="0">		<tr> 		  <td><div align="center"><a href="contact.html"><strong>Contact Us</strong></a></font></div></td>		  <td><div align="center"><a href="preconfigured.html"><strong>Gaming 			  Computers</strong></a></font></div></td>		  <td><div align="center"><a href="faq.html"><strong>FAQ's</strong></a></font></div></td>		  <td><div align="center"><a href="privacy.html"><strong>Privacy Policy</strong></a></font></div></td>		  <td><div align="center"><a href="help.html"><strong>Need Help?</strong></a></font></div></td>		</tr>	  </table>	</center>  </div>  <div class="footer">	<center>	  <a href="resources.html">Link Resources</a><br />	  Š 2006 <a href="index.html">PlugComputers.com</a>. Design by <a href="http://arcsin.se">Arcsin</a>	</center>  </div></div></body></html>

Any suggestions? Why doesnt this seem to be returning a numerical value at the end of the page at the "totalspan" command?

Thanks alot everyone. Hope you can help me get this resolved.
Edited by PlugComputers (see edit history)

Share this post


Link to post
Share on other sites

I have went on your site and tried clicking on several radio buttons to test the error you are facing. But nothing seems to be wrong, the price is reflected in my browser. Just so you know, I am using Mozilla Firefox. And everytime a radio button is clicked the price is updated as well. I think you have fixed the problem yourself already :P

Share this post


Link to post
Share on other sites

Yup, thats right darran. I figured it out. The reason is was returning NaN was because some of the inputs were left blank. If the javascript can not find a value in each input it will return it NaN. After filling in all the dollar amounts it works fine. Thanks for taking a look though. :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.