CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Returning a value to a textbox

Print topic Send  topic

Author Message
NerishaB

Posts: 25
Posted: 10/04/2010, 4:40 AM

I am creating a page that passes a key, that I used to ecrypt a key passed to that page. I want to display the decrypted key in a textbox. Now, I have the function created to perform the decryption, I just dont know how to display the result in a textbox. Am new to this.

See my code:
Function SwapLetters($Key)
{
$j = round(strlen($InputString) / 2) + 1;
$LeftString = Left($InputString, j -1);
$RightString = Substr($InputString, StrLen($LeftString));
$result = '';
For ($i = 0; i<StrLen($InputString); $i++) {
$result = $result . SubStr($LeftString, i, 1) . SubStr($RightString, i, 1);
}

}

And I am trying to place it in $TextBox3 = SwapLetters($KeyString);
View profile  Send private message
ckroon

Posts: 869
Posted: 10/04/2010, 5:55 AM

You have SwapLetters($KeyString);

perhaps you meant SwapLetters($Key);

If thats not it... then I would do something like this:

$change = SwapLetters($KeyString);

$Component->TextBox3->SetValue($change);

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
datadoit
Posted: 10/04/2010, 6:00 AM

You have to CodeChargisize it:

For your textbox component, in it's BeforeShow event, choose Add Action
and choose Call Function. Then put in SwapLetters($KeyString).

If $KeyString is in the URL, you can enter
SwapLetters(CCGetParam("theURLkey","")).

Make sure the function SwapLetters() is at the bottom of your
_events.php file before the closing ?> tag.
NerishaB

Posts: 25
Posted: 10/04/2010, 6:07 AM

I don't think it is working. The interesting thing is, if it just typed in $TextBox1->SetValue("1");
I still don't get anything displayed. What am I doing wrong? What do I need to do to populate a textbox?
View profile  Send private message
NerishaB

Posts: 25
Posted: 10/04/2010, 6:53 AM

I have tried that, but still get no result. Even if I just put in : $textbox3 = "abcde";
I still get not result.
View profile  Send private message
datadoit
Posted: 10/04/2010, 9:16 AM

Go through the tutorials: http://support.codecharge.com/tutorials.asp

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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