Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onSelect attribute for html:select tag

 
M Murthy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Whats the html:select equivalent of onselect attribute of select tag?
I went through all the attributes for html:select but there doesnt seem to be one for onselect functionality.
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onselect? I think you're looking for onclick
 
M Murthy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I am trying to achieve is everytime a user selects any of the options, I want to invoke a javascript, and depending on the value selected the javascript performs differently.
The problem with using onclick is that, it does not allow the user to select a particular value, instead when a user just clicks on the the drop down list the javascript gets called.
 
Ilja Smoli
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Im afraid onselect atrribute is only for textareas and text input types...
Look at html reference..

Btw you can use
[ December 21, 2004: Message edited by: Ilja Smoli ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onclick does not fire for tab events, you want to look at:

onchange
or
onblur

Eric
 
M Murthy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
calling a javascript in onchange in html:select works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic