davist
Posts: 4
|
Posted: 10/04/2006, 7:49 AM |
|
I am using CCS, php and MySQL
I have a listbox that is populated from a select statement. It has an additional value of "" (blank) as well - I want the blank to be the default selection when the page loads.
It seems that a random value is set as the "selected" value when the page is displayed.
this is what I have currently
<select name="{s_relationship_Name}" style="WIDTH: 161px">
<option value="" selected></option>
{s_relationship_Options}
</select>
any suggestions
Thank you
Tanya
|
|
|
FrankR
Posts: 154
|
Posted: 10/04/2006, 8:06 AM |
|
Is the listbox part of a Search panel? If so, you can pass the default value of the listbox as a parm to the page.
If the listbox is part of a Record panel, change the source SQL to order the list the way you want.
_________________
FR |
|
|
davist
Posts: 4
|
Posted: 10/04/2006, 8:15 AM |
|
Thanks, Frank.
The listbox is part of the search panel but the page is the default page that is loaded - so there is not a chance to pass a parm ......
|
|
|
WKempees
|
Posted: 10/04/2006, 10:39 AM |
|
Just change the DataSource [...] for the listbox (properties), add
Order by
on the TEXT part of the selected fields, apply Asc or Desc depending on your
language collation
Walter
"davist" <davist@forum.codecharge> schreef in bericht
news:134523c9ea6ca57@news.codecharge.com...
>I am using CCS, php and MySQL
>
> I have a listbox that is populated from a select statement. It has an
> additional value of "" (blank) as well - I want the blank to be the
> default
> selection when the page loads.
>
> It seems that a random value is set as the "selected" value when the page
> is
> displayed.
>
> this is what I have currently
>
> <select name="{s_relationship_Name}" style="WIDTH:
> 161px">
> <option value="" selected></option>
> {s_relationship_Options}
> </select>
>
> any suggestions
>
> Thank you
> Tanya
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
davist
Posts: 4
|
Posted: 10/04/2006, 12:31 PM |
|
Thank you Walter
But the blank is not coming from the database it is added in the html
<select name="{s_relationship_Name}" style="WIDTH: 161px">
<option value="" selected></option>
{s_relationship_Options}
</select>
Tanya
|
|
|