?
Solved

Select box with checkboxes

Posted on 2006-11-18
9
Medium Priority
?
1,203 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

764 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