CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 listbox

Print topic Send  topic

Author Message
zpr

Posts: 2
Posted: 09/25/2007, 5:21 AM

Hi all, :-)
I am new to this forum.I am here for some help.
I am totally novice in programming.
I want to make a list box in PHP which will display numbers from 1 to 100,along with which there will be a text box where I can write my name.
I want to make it such that in the first page it comes with 50 selected by default.
How to do it?
Can anyone help me please..i mean what should the code be?
Any help would be greatly appreciated.
Thanks in advance.
View profile  Send private message
klwillis


Posts: 428
Posted: 09/25/2007, 9:04 AM

You can do the following to populate the listbox, and set it's default value to 50.
Add this code within the 'BeforeShow' event for the listbox control.

$items = array();
for ($number = 1; $number <= 100; $number++)
{
$items[] = array($number,$number);
}
$Component->Values = $items;
unset($items);

$Component->SetValue(50);


Quote zpr:
Hi all, :-)
I am new to this forum.I am here for some help.
I am totally novice in programming.
I want to make a list box in PHP which will display numbers from 1 to 100,along with which there will be a text box where I can write my name.
I want to make it such that in the first page it comes with 50 selected by default.
How to do it?
Can anyone help me please..i mean what should the code be?
Any help would be greatly appreciated.
Thanks in advance.

_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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