group box with pull down menus, allowing only one to be used.

G

Guest

I have a group box within a form and wish to have pull down menus in it, but
allowing only one to be used, I know that you can do this with radio
buttons.

how can I do this please.

thank you
 
M

MD Websunlimited

Define "pull down menu" it is ambiguous as people also call a selection list a "pull down menu" Which is known to programmers as a
drop down selection box.

E.g. <select >
 
G

Guest

it is a drop down box, where you can select from a list of items.

in FrontPage it is added via the insert > form > drop-down box.

thanks
 
M

MD Websunlimited

There is implicit browser behavior that deals with radio and checkbox such that only the selected item is set in the GET or POST
data when the form is submitted. Drop Down Selection boxes will always send their even if they are given the same name. You just get
an array of values for that element. This information is provided so that if you're using the drop down selection boxes in form that
you understand that all of the values will be sent.

The following code will only allow a single selection box (D1 to D3) to have a value other than the first value.


<select size="1" name="D1" onchange="if (this.selectedIndex > 0) {this.form.D2.selectedIndex = 0;this.form.D3.selectedIndex = 0;}
 
G

Guest

i have below a form where i would like only one Drop Down Selection box can
be used.
the form does a call to a script to work out the totals of the selected
items.
i have tried to use the javascript: like i have seen in some webpages in
the past, but this did not work either.
i need only D1 or D2 to be used by the visitor, so if they select the value
of D1 to '2' and then select the value of D2 to 3, (the number selected does
not matter, as long as it is more than '0') the D1 value is set back to '0'
and vise-versa.


<select size="1" name="D1"
onchange="javascript:apple=0;form.favorordertableform.orange=0;gettotal()">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select></p>
<p><select size="1" name="D2"
onchange="javascript:eek:range=0;parent.favorordertableform.apple=0;gettotal()">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select></p>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top