By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

Unhide text using a radio button

P: n/a
I have researched unhiding text using Javascript. I found examples
unhiding text boxes.
I need to unhide text when a radio button has been selected.

Can someone point me to an example?


Thanks in Advance.
Nov 11 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
research_stuff wrote:
I have researched unhiding text using Javascript. *I found examples
unhiding text boxes.
I need to unhide text when a radio button has been selected.

Can someone point me to an example?
<p>Do you like fruits ?</p>

<p>
<input type="radio" name="like" value="no"
onClick="document.getElementById('w').style.visibi lity='hidden'">
No
<br>
<input type="radio" name="like" value="yes" checked
onClick="document.getElementById('w').style.visibi lity='visible'">
Yes
</p>

<p id="w">
If yes, which: <input type="text" name="fruits" size="20">
</p>

Hope this helps,

--
Bart
Nov 11 '08 #2

P: n/a
On Nov 11, 2:01*am, Bart Van der Donck <b...@nijlen.comwrote:
research_stuff wrote:
I have researched unhiding text using Javascript. *I found examples
unhiding text boxes.
I need to unhide text when a radio button has been selected.
Can someone point me to an example?

<p>Do you like fruits ?</p>

<p>
*<input type="radio" name="like" value="no"
* onClick="document.getElementById('w').style.visibi lity='hidden'">
*No
*<br>
*<input type="radio" name="like" value="yes" checked
* onClick="document.getElementById('w').style.visibi lity='visible'">
*Yes
</p>

<p id="w">
*If yes, which: <input type="text" name="fruits" size="20">
</p>

Hope this helps,

--
*Bart
Nov 12 '08 #3

P: n/a
On Nov 11, 2:01*am, Bart Van der Donck <b...@nijlen.comwrote:
research_stuff wrote:
I have researched unhiding text using Javascript. *I found examples
unhiding text boxes.
I need to unhide text when a radio button has been selected.
Can someone point me to an example?

<p>Do you like fruits ?</p>

<p>
*<input type="radio" name="like" value="no"
* onClick="document.getElementById('w').style.visibi lity='hidden'">
*No
*<br>
*<input type="radio" name="like" value="yes" checked
* onClick="document.getElementById('w').style.visibi lity='visible'">
*Yes
</p>

<p id="w">
*If yes, which: <input type="text" name="fruits" size="20">
</p>

Hope this helps,

--
*Bart
Does anything need to be coded in the script language ?
Nov 12 '08 #4

P: n/a
"research_stuff" <le*********@ix.netcom.comwrote in message
news:8a**********************************@i20g2000 prf.googlegroups.com...
On Nov 11, 2:01 am, Bart Van der Donck <b...@nijlen.comwrote:
research_stuff wrote:
I have researched unhiding text using Javascript. I found examples
unhiding text boxes.
I need to unhide text when a radio button has been selected.
Can someone point me to an example?

<p>Do you like fruits ?</p>

<p>
<input type="radio" name="like" value="no"
onClick="document.getElementById('w').style.visibi lity='hidden'">
No
<br>
<input type="radio" name="like" value="yes" checked
onClick="document.getElementById('w').style.visibi lity='visible'">
Yes
</p>

<p id="w">
If yes, which: <input type="text" name="fruits" size="20">
</p>

Hope this helps,

--
Bart
Does anything need to be coded in the script language ?
Well, yes and no

What follows onclick= IS JavaScript, so you could regard it as JS embedded
in the HTML

--
Trevor Lawrence
Canberra
Web Site http://trevorl.mvps.org
Nov 12 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.