HighDots Forums  

select option element onclick?

Javascript JavaScript language (comp.lang.javascript)


Discuss select option element onclick? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christopher Benson-Manica
 
Posts: n/a

Default select option element onclick? - 04-20-2004 , 11:33 AM






Apparently you can't use the onclick event handler for specific
options in a select element in IE - is that correct? If so, is there
a way to get the same functionality out of it? What I want to do is
have a select box where you can select multiple elements without
holding down the control key; when you click on an option, you toggle
its selected property. How can I do that?

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.

Reply With Quote
  #2  
Old   
Matt Kruse
 
Posts: n/a

Default Re: select option element onclick? - 04-20-2004 , 01:36 PM






"Christopher Benson-Manica" <ataru (AT) nospam (DOT) cyberspace.org> wrote:
Quote:
What I want to do is
have a select box where you can select multiple elements without
holding down the control key; when you click on an option, you toggle
its selected property. How can I do that?
This can be done by storing the selected options, and re-selecting each time
the user clicks.
For an example, see:
http://www.mattkruse.com/temp/easier-multi-select.html

--
Matt Kruse
Javascript Toolbox: http://www.mattkruse.com/javascript/




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.