Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple selections from a drop down box

Status
Not open for further replies.

crystalb24

Programmer
Aug 31, 2004
75
US
I'd like to create a drop down box that allows for multiple selections, but not by using the ctrl key. I'd like the drop down box to have checkboxes that the user can select, allowing them to select multiple items. Is this even possible?

~Crystal
Click here ( for a free iPod
 
u may have to build ur own dropdown for that. its pretty simple use a DIV with overflow set to auto and add a table in it with many rows (each having a checkbox), when the row exceed's the Div's height a scroll will come...

Known is handfull, Unknown is worldfull
 
So instead of using code like this:

Code:
<select>
<option></option>
<option value="letter">letter</option>
<option value="agenda">agenda</option>
<option value="questionnaire">questionnaire</option>
<option value="information packet">information packet</option>
</select>

...what would I need to do?

~Crystal
Click here ( for a free iPod
 
try this:
Code:
<script>
function Highlight(ChkBox)
{
	if(ChkBox.checked)
		ChkBox.parentNode.setAttribute('bgColor','blue')
	else
		ChkBox.parentNode.setAttribute('bgColor','')
}
</script>
<div style="border:#000000 1px solid;overflow:auto;width:200px;height:80px">
<table style="cursor: default" width="100%" cellspacing="0">
<tr><td>
<input type="checkbox" onclick="Highlight(this)">asdasd
</td></tr>
<tr><td>
<input type="checkbox" onclick="Highlight(this)">asdasd
</td></tr>
<tr><td>
<input type="checkbox" onclick="Highlight(this)">asdasd
</td></tr>
<tr><td>
<input type="checkbox" onclick="Highlight(this)">asdasd
</td></tr>
<tr><td>
<input type="checkbox" onclick="Highlight(this)">asdasd
</td></tr>
</table>
</div>

Known is handfull, Unknown is worldfull
 
ah, that i am afraid cannot be done, try searching the web for a dynamic dropdown...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top