• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hide dropdown list

 
anvi kon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Establish a focus handler on the text box. In the handler, show or hide the select element.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I do it in javascript?




thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic