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

 textbox->GetValue() from another object

Print topic Send  topic

Author Message
lsk6745

Posts: 3
Posted: 07/15/2008, 10:55 PM

If I have a form and a textbox located on it.
how can I get the value of the textbox out when I am outside the form.
I used

global $MainPage;
$myVar = $MainPage->myForm->myTextBox->GetValue();
or
global $myForm;
$myVar = $myForm->myTexBbox->GetValue();

but does not work.
Can anyone give me some hints? thx :-)

lsk
_________________
thx a lot
View profile  Send private message
jjrjr1


Posts: 942
Posted: 07/16/2008, 10:02 AM

Hi

I actually just ran a test on this and the code like you had does in fact work

I put this in the before output event and it was able to get the value outside of the form

The form in this case is called testdb and the control is tst_one.

global $testdb;
echo $testdb->tst_one->GetValue();

Be sure you are calling this after the control has been initialized by the main application.

Not sure why your second example does not work. It should.
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
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.

Web Database

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.