WebSite-PHP Framework PHP
Multi langues
Mode Ajax simple
Aucun HTML, aucun JavaScript
URL rewrinting
Envoi d'email
Sitemap - RSS - Web service
Télécharger le Framework WebSite-PHP maintenant
 


Loading
 


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

Tutoriels

>

Tutoriel Calendar

>

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


Calendar-03: Tutoriel du composants Calendar du FrameWork PHP WebSite-PHP.

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



Retourner aux tutoriels du composants Calendar



Code source

Code source


Fichier: /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);
        }
    }
}
?>


Retourner aux tutoriels du composants Calendar


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Accueil Documentation Télécharger Quick start Tutoriels Wiki Issue Tracker