CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge -> IDE/GUI

 Default selection for a listbox

Print topic Send  topic

Author Message
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

View profile  Send private message
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
View profile  Send private message
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 ......
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.