?
Solved

Select box with checkboxes

Posted on 2006-11-18
9
Medium Priority
?
1,204 Views
Last Modified: 2008-02-01
Wonder if you guys can help me?

I want a dropdown box (easy), BUT, I want the content of the drop down box to be a series of checkboxes. I know it can be done in pure XHTML, but a combination of HTML/Javascript/DOM should work ... I think?

Also note, that when the user clicks on the dropdown list, the z-indez of that IFRAME or layer (what ever you use) must be on top of any other control. And, when a user checks on any of the control, and clicks anywhere on the body of the HTML form, the select box should have the values of the checkbox. And when the user clicks on the select box it should check the values the user has checked.

Hope I've made sense?

I know it sounds compliciated, I sure cant do it. Please let me know if its possible?
Thanks
Mousemat24
0
Comment
Question by:mousemat24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17972029
not possible 'cause the option tag my not contain any other tags, just #PCDATA
0
 

Author Comment

by:mousemat24
ID: 17972208
How about something that "looks" like a select box, but when you click on it, it opens up as a "like" a select box with checkboxs?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17972246
well you can write a javascript function which is called when you select something from your pulldown, and then creates a checkbox in the DOM which itself shows your pulldown again with onmouseover event.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 17972271
or use something like:

  <input type=checkbox ... id="check1" style="display:none" />
  <select name=pulldown >
     <option>string</option>
     <option>checkme</option>
   ...
    </select>

where you set the chekbox to display:visible ifyou have selected it.
0
 

Author Comment

by:mousemat24
ID: 17972377

 ------------------
|                  |V|
 ------------------
|                      |
| [X]  test         |
| [X]  testing     |
| [X]  paper      |
| [  ]  pen         |
| [  ]  color       |
-------------------

The bove is the kind of thing I want, a so called list box with check boxes
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17972517
As I said: not possible with option tag. Dot. Period.
Did you try my suggestion with the invisible checkbox, which gets displayedon change?

something like:
  <select name=pulldown onchange="document.getElementById('check1').style.display='visible'">

Note that you need to hide all others, and hilight only the one depending on your selection.
0
 
LVL 6

Accepted Solution

by:
iscode earned 2000 total points
ID: 17976255
can this be an option for you :)
http://c82.net/samples/checklist-basic.html
0
 

Author Comment

by:mousemat24
ID: 17990789
Thanks iscode

Thats kinda what I was looking for.
0
 
LVL 6

Expert Comment

by:iscode
ID: 18004418
Your welcome mousemat24

Glad I could help
iscode
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question