<form>
<select name="foo" onchange="this.form.r[2].checked=true";>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<input type="radio" name="r" value="a" />a
<input type="radio" name="r" value="b" />b
<input type="radio" name="r" value="c" />c
</form>
On Thu, 28 Oct 2004 11:48:51 -0400, Tangorre, Michael
<[EMAIL PROTECTED]> wrote:
> > I have a form that has a series of radio buttons, so that
> > users can choose a timeperiod. If the user picks 'Range',
> > they can then also choose 'one week, two weeks, one month,
> > etc.' to specify the range.
> >
> > What I'm wondering... is whether there is a way I can write
> > something in JavaScript that says 'if the user chooses
> > something from 'Dropdown X', automatically select 'Radio Button Y'?
>
> Sure,
>
> Using the onChange event handler for the select box add a function that
> does this:
>
> //pseudo-code
>
> If the value of select box "x" is not null or an empty string
> Set the radio button "y" to something.
>
> Mike
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=35
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182825
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54