uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
javascript form

Knowledge Base Lobby : uShop Support Conference : Programmer Tips
Nov-20-17 07:42 PM EST
Original Message
javascript form
Author Roger on 04-08-2002 at 12:40 (EST)
hello
i need help in how to add a modifiyer to radio button

in the example form it only shows how to add a modifier to the checkbox not the radio

here is what they have in the example javascript form
--------------------------------------------------

// Special logic for radio buttons.
if (document.P12345.card_layout[0].checked == true)
{
layout = document.P12345.card_layout[0].value;
}
else
{
layout = document.P12345.card_layout[1].value;
}

// Special logic for checkboxes.
if (document.P12345.card_other[0].checked == true)
{
additional_options += document.P12345.card_other[0].value + " ";
price_modifier += 1.0;
}
if (document.P12345.card_other[1].checked == true)
{
additional_options += document.P12345.card_other[1].value;
price_modifier += 1.0;
}

--------------------------------------------------

i need to add price to an selection
if i put it in the checkbox then that means they can add more then one..i only want one selection not multiple

an i want to be able to add price to that selection of my choosing not a predesign price


my ideal solution is to do a drop down option but i dont know how to do javascript
but i would like to have a drop down option instead of the radio or checkbox

so if anyone knows howto do both for me that would be great

1.) add a price modifier to the radio button like it is in the checkbox

2.) how to write java script for drop down option where i can put the list of items for sale an have that be modified as well with price choice


thanks please email me at
ROJERE3@aol.com
since i dont check here often

but im on aol all time..

E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: javascript form Bill Weiner, 2002-04-09 04:51:00 (1)

Messages In This Discussion
         1. RE: javascript form
        Author Bill Weiner on 04-09-2002 at 04:51 (EST)
Hmmmm... So it sounds like ideally you want to dynamically change the contents of a drop-down SELECT item?

If so, then you should be able to dynamically modify the SELECT by directly modifying the options[] array, such as:

To change the first option to "Hello World":
myselect.options[0] = "Hello World";

To change the second option to "Goodbye":
myselect.options[1] = "Goodbye";

To remove the first option:
myselect.options[0] = null;

To clear the entire option list:
myselect.options.length = 0;
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.