summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php
index c5440996..d6dded08 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php
+++ b/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php
@@ -2,22 +2,16 @@
class Home extends TPage
{
- function validator2_onValidate($sender, $param)
+ function check_validate($sender, $params)
{
- $sender->Enabled = $this->check1->Checked;
+ $sender->enabled = $this->check1->checked;
}
-
- function validate2_onPostValidate($sender, $param)
- {
- $sender->Enabled = true;
- }
-
+
function onPreRender($param)
{
- parent::onPreRender($param);
- $this->panel1->Style =
- $this->check1->Checked ? "display:block" : "display:none";
- }
+ //always re-enable the validator2 so as to display the client-side validator
+ $this->validator2->enabled=true;
+ }
}
?> \ No newline at end of file