File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display or not to display other controls

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some radio buttons for four different tasks,

1. Something here.
2. Something 2 here.
3. SOmething 3 here.
4. something 4 here.

On checking each one i must push some controls in-between dynamically, so that they can be added. Selection of first radio mush push-in two text-box and deselection(by selecting other radio buttons) must hide text-boxes back, selection of option 2 must push-in say a text-area and list box...

HOw do i render/generate/hide such dynamic controls???
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onclick="document.getElementById('divId').style.display=(this.checked)?'block':'none';"

<div id="idvId" style="display:none">foo</div>
[ December 14, 2006: Message edited by: Eric Pascarello ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forgot to mention, you need to build a function to loop through the other controls and hide them. The code above is really meant for a checkbox.

Eric
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric. It worked for me here.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic