![]() |
using the selected value of a pull down menus (please help)
see my newer posts below...
|
Your IF statements should look something like...
Code:
if (f.region.options[f.region.selectedIndex].value == "CA"){ |
are you calculating prices on the client? If so, you're asking for trouble.
|
^^^^^^^
No this is just to display the total to the customer as they select different choices. The actual total will be determined server-side. I need this to work because the prices vary on the choices the user selects. |
see updated posts...
|
see updated posts...
|
see updated posts...
|
see updated posts...
|
i have briefly looked at your code try this
if (f.region.options[f.region.selectedIndex].value == 1 && f.sublength.options[f.sublength.selectedIndex].value == 1){ var foo = 23; } and change f.pay.value = windustrial + wcommercial + wtracts + wcustom + wmulti + wca03price + wca06price + wca12price + wns03price + wns06price + wns12price; to f.pay.value = foo + windustrial + wcommercial + wtracts + wcustom + wmulti + wca03price + wca06price + wca12price + wns03price + wns06price + wns12price; i think thats what you are trying to do |
Updated code...
Here's the new HTML
Code:
<html>PHP Code:
|
Each form object now affects the price when you check a box or select something from a menu...but no matter what you select, the price always says $0.00
I guess something isn't adding up right...I'm not sure how to fix it. |
ok thanks for posting your code, whats wrong with it now, you forgot to mention that :)
|
everything works except for price doesn't add up correctly.
it always displays $0.00 |
Ok thanks for the help everyone...I have everything pretty much under control now. I think I can fix everything else by myself now.
|
| All times are GMT -5. The time now is 12:11 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.