This is a discussion on "Show and Hide Text - how do I do that?" within the JavaScript Forum section. This forum, and the thread "Show and Hide Text - how do I do that? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Show and Hide Text - how do I do that?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Is there a simple way, through the use of the onclick event, to show and hide text? I don't want to use a <div> unless completely necessary.
Basically I have a form, and it contains username and password text fields, depending on which <radio> button is hit, the username/password fields will be disabled (already coded that part) and I also want the red * next to these fields to disappear, so the user further realizes that the username/password fields don't need to be filled in. Is there a quick way to do this with the onclick() event in javascript? I know, I know...I really need to learn javascript already |
|
|
|
||||
|
Re: Show and Hide Text - how do I do that?
You don;t necesserally need a div, but you'll need a paragraph/fieldset/span or something to wrapt the elements you want to show/hide.
Anyway, I'll point you in the right direction: jQuery. I have not tested the following, I just typed it as I went along... But that's the basic idea:
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Last edited by karinne; Mar 30th, 2007 at 15:08. Reason: Please use [code]...[/code] tags when displaying code! |
![]() |
| Tags |
| hide text, show text |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Show/Hide text fields based on drop down | sing2trees | JavaScript Forum | 1 | Apr 22nd, 2008 21:01 |
| CSS Show Hide with JS | abis123 | JavaScript Forum | 4 | Dec 13th, 2007 05:39 |
| [SOLVED] Show&Hide Div Box | Maska | JavaScript Forum | 6 | Oct 1st, 2007 11:04 |
| Show/Hide JS | pa007 | JavaScript Forum | 0 | Apr 6th, 2007 19:18 |
| Show/Hide Div Help | Trebz | JavaScript Forum | 2 | Feb 21st, 2006 22:37 |