CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 LIST BOX Popolate TExt Field

Print topic Send  topic

Author Message
softmafia

Posts: 44
Posted: 03/27/2013, 10:04 PM

Please can anyone help me out here
I am trying to implement
A list Box carry product to populate the price
field once a product is selected
I followed the Example in Order Entry in Example Park
that particular function its not working
Can Someone help me with this
the senerio is this

2 tables

order
item_id (Listbox conected to the items table to grid out item name)
ordercost
etc

Items
item_id
itemname
cost

i want when the list box is selected it should populate the the ordercost with the value of cost in the item table.
_________________
softmafia
View profile  Send private message
ckroon

Posts: 868
Posted: 03/28/2013, 1:59 AM

Put this code on the On Validate event of the ListBox

//get the Listbox content
$get = $Component->GetValue();
//now set a session variable with the ListBox's content
CCSetSession("cost",$get);
////


Then....put this on your TextBox Before Show Event

$cost = CCGetSession("cost","0");
$Component->SetValue($cost);

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
softmafia

Posts: 44
Posted: 03/28/2013, 7:22 AM

Ckroon thanks for the Reply But It didn't Work
let me set 2 things staright
1st the listbox is tied to Items_id as the bound column and itemname as the text colum
so the last field cost is not used but needs to be called up to populate the cost field when a particular item is selected.
And its an Order editable gridform which you can have multiple order on one page

And again this your solution also sets all fields to 0 even the one that has been entered before
take a look at the Order Entry Example thats what am trying to achieve.

and again What Happened to Walter Kempees?

_________________
softmafia
View profile  Send private message
ckroon

Posts: 868
Posted: 04/18/2013, 3:09 PM

Walter was a FANTASTIC CCS user who helped out a TON of people. Sadly he died from a rare blood disease very suddenly.
_________________
Walter Kempees...you are dearly missed.
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.