diff options
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript')
| -rw-r--r-- | demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page | 39 | ||||
| -rw-r--r-- | demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php | 29 | 
2 files changed, 68 insertions, 0 deletions
| diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page new file mode 100644 index 00000000..49baa47c --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page @@ -0,0 +1,39 @@ +<com:TContent ID="body">
 +<h1>TCallbackClientScript Samples</h1>
 +
 +<p>
 +  Choose an action from the list and click the button; the server-side php code will get the selected value and
 +  force the execution of some clientside js code in the callback response.
 +</p>
 +
 +<h2>Actions</h2>
 +<com:TRadioButtonList ID="radio1">
 +  <com:TListItem Value="1" Text="alert() me of something" />
 +  <com:TListItem Value="2" Text="toggle Checkbox 1" />
 +  <com:TListItem Value="3" Text="hide Label 1" />
 +  <com:TListItem Value="4" Text="show Label 1" />
 +  <com:TListItem Value="5" Text="focus TextBox 1" />
 +</com:TRadioButtonList>
 +
 +<br/><com:TActiveButton ID="button1" OnCallback="buttonCallback" Text="callback!" />
 +
 +<h2>Results</h2>
 +
 +<table>
 +  <tr>
 +    <td>Checkbox 1:</td>
 +    <td><com:TCheckBox ID="check1" Text="Checkbox 1" /></td>
 +  </tr>
 +  <tr>
 +    <td>Label 1:</td>
 +    <td><com:TLabel ID="label1" ForeColor="Red" Text="Text of Label 1" /></td>
 +  </tr>
 +  <tr>
 +    <td>TextBox 1:</td>
 +    <td><com:TTextBox ID="txt1" Text="Sample text" /></td>
 +  </tr>
 +</table>
 +
 +<com:TJavascriptLogger />
 +
 +<div class="last-modified">$Id: Home.page -1   $</div></com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php new file mode 100644 index 00000000..500d7987 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php @@ -0,0 +1,29 @@ +<?php
 +
 +// $Id: Home.php -1   $
 +class Home extends TPage
 +{
 +	public function buttonCallback ($sender, $param)
 +	{
 +		switch($this->radio1->SelectedValue)
 +		{
 +			case 1:
 +				$this->getCallbackClient()->evaluateScript("<script> alert('something'); </script>");
 +				break;
 +			case 2:
 +				$this->getCallbackClient()->check($this->check1, !$this->check1->Checked);
 +				break;
 +			case 3:
 +				$this->getCallbackClient()->hide($this->label1);
 +				break;
 +			case 4:
 +				$this->getCallbackClient()->show($this->label1);
 +				break;
 +			case 5:
 +				$this->getCallbackClient()->focus($this->txt1);
 +				break;
 +		}
 +	}
 +}
 +
 +?>
\ No newline at end of file | 
