Jump to content

PlugComputers

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PlugComputers's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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: www.plugcomputers.com/amdscheduletest.php I only have dollar amounts applied to the "Processors" section, but it should work with just those values. Here is the important html of the page (where i think the problem lies...), 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://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script language="JavaScript" type="text/javascript"> <!--Hide script from old browsers function 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="$"+total total='1200'; } </script> <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://www.plugcomputers.com">Plug Computers</a></font></strong><br /> <font size="4"><a href="http://www.plugcomputers.com">http://www.PlugComputers.com</a></font></font></h1> <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 /> ***CODE BREAK*** <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.
  2. I dont really want a whole ecommerce system. I just need something where they have some type of idea what they are selecting. People are configuring computers way out of their price range and then are shocked by the price when they are contacted with a quote. Any suggestions?
  3. Right, but how could I assign dollar values to each radio button so it knows which prices to include in the total when updated?
  4. Yeah thats what I was going to do. Next to the text I was going to put "[+$50]" or whatever the upgrade price was so they have some idea while sorting through all of their options.. What do you mean TRION? How could I do that? I don't really have a payment gateway setup to do a "checkout" persay..
  5. So should I post somewhere else? Or do you guys/gals (?) have any ideas on what I can do? Thanks...
  6. Is there a better forum you would recommend posting this in then? Where would be the best place?
  7. Hey, Let me try to do my best to explain this... I have a business website that specializes in building custom computers. Customers can use our online form to select components for their computer from various categories (Hard drive size, processor, memory, ect..) Take a look at the page here: www.plugcomputers.com/amdschedule.php As you can see there are many radio buttons with different computer part choices. I wanted to add some way to assign a dollar value to each different part, so the customer knows how much its costing them with each upgrade. If you scroll to the bottom of the page you will see some red text, I want that price to reflect the sum off all the choices they made above. Adding up all the different upgrade dollar amounts so that they have an idea how much their computer will be while selecting components. The current red number at the bottom is the base price with all the default selected values. For example, in the first category "Processor" The base price includes the AMD x2 3800+, If i wanted the upgrade price for the next option (the AMD x2 4400+) to be +$50 how can I get that into the form so when the user clicks that radio the price at the bottom automatically adds $50? Thank you and I appreciate any help...
  8. Hello all. I have recently changed some stuff around on my website and now my form email script is not working on the page...heres my situation: On my website Plug Computers we have custom build configuration pages (for example: http://www.plugcomputers.com/intelschedule2.php The way the forms results have been done in the past is with a email script where I get the form results in my email. This has worked well, but now it is not working. I recently added a new script to the page in order to assign dollar values to each of the computer parts via javascript. You can see at the bottom of the page the price is updated depending upon what computer components are selected. Since adding this my script that emails my form results does not work. When you click the submit button on the bottom of the page nothing happens. Could you please take a look at my source on http://www.plugcomputers.com/intelschedule2.php and tell me what is going on and why are these 2 functions conflicting... Thanks alot.
  9. Hello all. I have recently changed some stuff around on my website and now my form email script is not working on the page...heres my situation: On my website Plug Computers we have custom build configuration pages (for example: http://www.plugcomputers.com/intelschedule2.php The way the forms results have been done in the past is with a email script where I get the form results in my email. This has worked well, but now it is not working. I recently added a new script to the page in order to assign dollar values to each of the computer parts via javascript. You can see at the bottom of the page the price is updated depending upon what computer components are selected. Since adding this my script that emails my form results does not work. When you click the submit button on the bottom of the page nothing happens. Could you please take a look at my source on http://www.plugcomputers.com/intelschedule2.php and tell me what is going on and why are these 2 functions conflicting... Thanks alot.
×
×
  • Create New...

Important Information

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.