Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
simple shopping cart problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="David Morris, post: 4718924"] First suggestion, change your select tags as follows: <select name="RAM" onChange="Calc();"> <option value="0.00">128 MB</option> <option value="70.00">256 MB DDR(add $70)</option> <option value="150.00">512 MB DDR (add $150)</option> <option value="280.00">1 GM DDR (add $280)</option> </select> This will remove the need for your arrays. Second, add an input box somewhere as follows: <input name=price onFocus="blur();"> Third, change your Calc() function as follows: function Calc() { basePrice += parseFloat(myform.RAM.value); basePrice += parseFloat(myform.HardDrive.value); basePrice += parseFloat(myform.OS.value); myform.Price.value = basePrice; } You will probably need to format the price to pad extra zero's so $120 looks like $120.00. Hope this helps. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
simple shopping cart problem
Top