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 : Button with input text 
in form, callback method on click in AJAX

Tutoriels

>

Tutoriel Button

>

Tutorial : Button with input text in form, callback method on click in AJAX


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

Tutorial : Button with input text in form, callback method on click in AJAX:




Retourner aux tutoriels du composants Button



Code source

Code source


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

<?php
class Button05 extends Page {
    private 
$text null;
    
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Button with input text 
                    in form, callback method on click in AJAX"
;
        
        
$form = new Form($this);
        
        
$this->text = new TextBox($form);
        
$this->text->setValue("Enter your text");
        
$this->text->setStripTags("<b><i>");
        
        
$button = new Button($form);
        
$button->setValue("Validate")->onClick("onClickButton");
        
$button->setAjaxEvent();
        
        
$form_obj = new Object($this->text"<br/>"$button);
        
        
$form->setContent($form_obj);
        
$this->render $form;
    }
    
    public function 
onClickButton($sender) {
        
$dialog = new DialogBox("onClickButton"
                        
$this->text->getValue());
        
$this->addObject($dialog);
    }
}
?>


Retourner aux tutoriels du composants Button


Share

 


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