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

Tutoriels

>

Tutoriel Selectlist

>

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


Selectlist-05: Tutoriel du composants Selectlist du FrameWork PHP WebSite-PHP.

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




Retourner aux tutoriels du composants Selectlist



Code source

Code source


Fichier: /pages/tutorials/selectlist/selectlist-05.php

<?php
class Selectlist05 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : SelectList with form, 
                            callback method on change in AJAX"
;
        
        
$form = new Form($this);
        
        
$this->selectlist = new SelectList($form);
        
$this->selectlist->setNbLines(3);
        
$this->selectlist->addItem("value 1""value 1");
        
$this->selectlist->addItem("value 2""value 2");
        
$this->selectlist->addItem("value 3""value 3");
        
$this->selectlist->addItem("value 4""value 4");
        
$this->selectlist->addItem("value 5""value 5");
        
$this->selectlist->addItem("value 6""value 6");
        
$this->selectlist->onChange("onChangeSelectList");
        
$this->selectlist->setAjaxEvent();
        
$this->selectlist->setStripTags();
        
        
$form->setContent($this->selectlist);
        
$this->render $form;
        
$this->render = new WSPObject($this->render"<br/>");
    }
    
    public function 
onChangeSelectList($sender) {
        
$dialog = new DialogBox("onChangeSelectList"
                        
$this->selectlist->getValue());
        
$this->addObject($dialog);
    }
}
?>


Retourner aux tutoriels du composants Selectlist


Share

 


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