Worked like a charm --thanks everybody!!

--
Jillian

-----Original Message-----
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: October 28, 2004 9:52 AM
To: CF-Talk
Subject: Re: JavaScript Form Behaviour


<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
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sams Teach Yourself Regular Expressions in 10 Minutes  by Ben Forta 
http://www.houseoffusion.com/banners/view.cfm?bannerid=40

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182834
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to