Page 1 of 1
Set Focus on multiple select?
Posted: Mon Feb 12, 2007 2:01 pm
by kingconnections
I have a multiple select box that is dynamicly generated. I have coded it so that you can pass in items to it and the will be selected.
This all works. The problem is that the selected items do not "come to focus" so to speak on the page. If the selected items are not at the top of the list, you would have to scroll down to know that they were selected. I am trying to figure out a solution for this issue. Does any one have any ideas?
TIA!!!!
Posted: Mon Feb 12, 2007 2:07 pm
by feyd
On multiples through drop downs, it's up to the browser which, if any, are shown in the closed state. The most straight forward way to show them is through a list box so that more than one item is seen at a time.
Posted: Mon Feb 12, 2007 2:12 pm
by kingconnections
Hmm,
What about a java script or something to bring the focus? And this is a select box with the multiple option set.
example:
Code: Select all
<select name="month">
<option value="<?php echo $month;?>" SELECTED><?php echo $month;?></option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
If I sec December to be selected it would be highlighted in the box, but to see that you would need to scroll all the way down to see it.
Posted: Mon Feb 12, 2007 2:34 pm
by kingconnections
I guess I could do like this example and just place them at the top of the list?
Posted: Mon Feb 12, 2007 3:55 pm
by RobertGonzalez
This is a client side issue. Moved to client side.