wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes hide  dropdown list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "hide  dropdown list " Watch "hide  dropdown list " New topic
Author

hide dropdown list

anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
Hi,

Is anyone tell me , How to pop up or show the dropdown list onlick event of textbox?

I have one textbox and dropdownlist. whenever I click the textbox show the dropdownlist otherwise hide it.

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

Establish a focus handler on the text box. In the handler, show or hide the select element.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

Using jQuery:

Without jQuery: well, life's too short to deal with doing this in raw JavaScript with all the IE warts with respect to event handling in a cross-browser fashion.
anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
Can I do it in javascript?




thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

jQuery is "doing it with JavaScript". jQuery is a JavaScript library.

If you want to do it "by hand", sure you can do that too -- it's just more code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hide dropdown list
 
Similar Threads
DropDown List when i focus the textBox
DropDownList value changes
how to show same row for each click on a link
How to show a textfield dynamically
How to show a textfield dynamically using struts..(URGENT)