diff options
| author | ctrlaltca@gmail.com <> | 2011-06-02 16:06:37 +0000 | 
|---|---|---|
| committer | ctrlaltca@gmail.com <> | 2011-06-02 16:06:37 +0000 | 
| commit | 6394a6ffe3a9f3e4e698603b94503dc96f1e2652 (patch) | |
| tree | 26dfde346742329d064d336936edf20fdb7cb81e /demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions | |
| parent | b9f9a16d7eefc48ac489c8cb2b87749459bb3d38 (diff) | |
upported documentation changes to trunk/
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions')
| -rw-r--r-- | demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page | 77 | ||||
| -rw-r--r-- | demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php | 12 | 
2 files changed, 89 insertions, 0 deletions
| diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page new file mode 100644 index 00000000..9cc2f155 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page @@ -0,0 +1,77 @@ +<com:TContent ID="body">
 +<h1>TCallbackOptions Samples</h1>
 +
 +<table class="sampletable">
 +
 +<tr><td class="samplenote">
 +A callback button with attached client side options:
 +</td><td class="sampleaction">
 +<com:TActiveButton
 +	Text="click me"
 +	OnCallback="buttonCallback"
 +	ActiveControl.CallbackOptions="options"
 +/>
 +<com:TCallbackOptions
 +	ID="options"
 +	ClientSide.OnLoading="$('callback_status2').hide(); new Effect.BlindDown('callback_status', { duration: 1 });"
 +	ClientSide.OnComplete="new Effect.BlindUp('callback_status', { duration: 1 }); $('callback_status2').show();"
 +/>
 +<div id="callback_status" style="display:none;">please wait 5 seconds for the callback to complete...</div>
 +<div id="callback_status2" style="display:none;">callback completed!</div>
 +</td></tr>
 +
 +<tr><td class="samplenote">
 +Same example as before, but this time interacting with another Prado control:
 +</td><td class="sampleaction">
 +<com:TActiveButton
 +	Text="click me"
 +	OnCallback="buttonCallback"
 +	ActiveControl.CallbackOptions="options2"
 +/>
 +<com:TCallbackOptions
 +	ID="options2"
 +	ClientSide.OnLoading="$('<%= $this->label1->ClientID %>').innerHTML='please wait 5 seconds for the callback to complete....';"
 +	ClientSide.OnComplete="$('<%= $this->label1->ClientID %>').innerHTML='callback completed!';"
 +/>
 +<br/><com:TLabel ID="label1" ForeColor="Red" Text="waiting for button click.." />
 +</td></tr>
 +
 +<tr><td class="samplenote">
 +The same TCallbackOptions can be shared among different controls, even of different types:
 +</td><td class="sampleaction">
 +<com:TActiveButton
 +	Text="simple button"
 +	OnCallback="buttonCallback"
 +	ActiveControl.CallbackOptions="options3"
 +/>
 +
 +<br/><com:TActiveCheckBox
 +	Text="simple checkbox"
 +	OnCallback="buttonCallback"
 +	ActiveControl.CallbackOptions="options3"
 +/>
 +
 +<br/><com:TActiveDropDownList
 +	OnCallback="buttonCallback"
 +	ActiveControl.CallbackOptions="options3"
 +>
 +	<com:TListItem Value="value 1" Text="item 1" />
 +	<com:TListItem Value="value 2" Text="item 2" Selected="true" />
 +	<com:TListItem Value="value 3" Text="item 3" />
 +	<com:TListItem Value="value 4" Text="item 4" />
 +</com:TActiveDropDownList>
 +
 +<br/><com:TLabel ID="label2" ForeColor="Red" Text="waiting for any control to callback.." />
 +
 +<com:TCallbackOptions
 +	ID="options3"
 +	ClientSide.OnLoading="$('<%= $this->label2->ClientID %>').innerHTML='please wait 5 seconds for the callback to complete....';"
 +	ClientSide.OnComplete="$('<%= $this->label2->ClientID %>').innerHTML='callback completed!';"
 +/>
 +
 +</td></tr>
 +</table>
 +
 +<com:TJavascriptLogger />
 +
 +<div class="last-modified">$Id$</div></com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php new file mode 100644 index 00000000..6f101107 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.php @@ -0,0 +1,12 @@ +<?php
 +
 +// $Id$
 +class Home extends TPage
 +{
 +	public function buttonCallback ($sender, $param)
 +	{
 +		sleep(5);
 +	}
 +}
 +
 +?>
\ No newline at end of file | 
