WebSite-PHP Framework PHP
Multi language
Simple Ajax mode
No HTML, no JavaScript
URL rewriting
Mail sending
Sitemap - RSS - Web service
Download WebSite-PHP FrameWork now
 


Loading
 


Tutorial : CheckBox onchange Ajax event
            with a personal waiting message

Tutorials

>

Tutorial Checkbox

>

Tutorial : CheckBox onchange Ajax event with a personal waiting message


Checkbox-04: Tutorial of the composant Checkbox of the PHP FrameWork WebSite-PHP.

Tutorial : CheckBox onchange Ajax event with a personal waiting message:



Go back to tutorial of the componant Checkbox



Source code

Source code


File: /pages/tutorials/checkbox/checkbox-04.php

<?php
class Checkbox04 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : CheckBox onchange Ajax event
                    with a personal waiting message"
;
        
        
$this->render = new Form($this);
        
$chk1 = new CheckBox($this->render);
        
$chk1->setText("CheckBox 1");
        
$chk1->onChange("onChangeChk1");

        
$chk1->setAjaxEvent();
        
$chk1->setAjaxWaitMessage("My personal waiting message");

        
$this->render->setContent($chk1);
    }
    
    public function 
onChangeChk1($sender) {
        
alert("CheckBox is ".(!$sender->isChecked()?"not ":"").
                
"checked.");
    }
}
?>


Go back to tutorial of the componant Checkbox


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Home Documentation Download Quick start Tutorials Wiki Issue Tracker