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 : Calendar with form, 
callback method on change in AJAX

Tutorials

>

Tutorial Calendar

>

Tutorial : Calendar with form, callback method on change in AJAX


Calendar-03: Tutorial of the composant Calendar of the PHP FrameWork WebSite-PHP.

Tutorial : Calendar with form, callback method on change in AJAX:



Go back to tutorial of the componant Calendar



Source code

Source code


File: /pages/tutorials/calendar/calendar-03.php

<?php
class Calendar03 extends Page {
    private 
$edt_date null;
    
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Calendar with form, 
                        callback method on change in AJAX"
;
        
        
$form = new Form($this);
        
        
$this->edt_date = new Calendar($form);
        
$this->edt_date->onChange("onChangeCalendar");
        
$this->edt_date->setAjaxEvent();
        
        
$form->setContent($this->edt_date);
        
$this->render $form;
    }
    
    public function 
onChangeCalendar($sender) {
        if (
get_class($this->edt_date->getValue()) == "DateTime") {
            
$dialog = new DialogBox("onChangeCalendar"
                    
$this->edt_date->getValue()->format("m-d-Y"));
            
$this->addObject($dialog);
        }
    }
}
?>


Go back to tutorial of the componant Calendar


Share

 


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