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