![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need to fix the horizontal display length for my list box. |
|
if there is no element in it the display shrinks. |
|
i want to avoid this. |
#3
| |||
| |||
|
#4
| ||||
| ||||
|
|
data in select is coming from a query and its possible that there are no records in the selection. |
|
this is strange that you are finding it difficult to imagine such a scenario. |
|
anyways, my problem is solved. |
|
thanks |
#5
| |||
| |||
|
|
data in select is coming from a query and its possible that there are no records in the selection. |
|
this is strange that you are finding it difficult to imagine such a scenario. |
|
anyways, my problem is solved. |
#6
| |||
| |||
|
|
data in select is coming from a query and its possible that there are no records in the selection. this is strange that you are finding it difficult to imagine such a scenario. |
|
anyways, my problem is solved. |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
what i wanted was the width attribute of select tag. using this one can fix the horizontal display size of a list box. |
#9
| |||
| |||
|
|
Jonathan N. Little wrote: Two things. One, you did not quote, tsk-tsk. Two, you missed everyone's point, a SELECT element with *no* OPTIONS is invalid and makes no sense. If that situation occurs you should not create the SELECT but instead some indication that no options exist... My favourite way of doing this (in PHP) is: |
|
?php $started = FALSE; while ($data = pg_fetch_array($results)) { if (!$started) { print "<select blah blah blah>\n"; $started = TRUE; } //printf("\t<option>%s</option>\n", htmlentities($data['option'])); |
|
} if ($started) print "</select>\n"; unset($started); ? |
#10
| |||
| |||
|
|
$v = htmlentities($data['option']); printf("\t<option value=\"%s\">%s</option>\n", $v, $v); |
![]() |
| Thread Tools | |
| Display Modes | |
| |