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

Tutorials

>

Tutorial Button

>

Tutorial : Button with form, callback method on click


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

Tutorial : Button with form, callback method on click:



Go back to tutorial of the componant Button



Source code

Source code


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

<?php
class Button04 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Button with form, 
                                    callback method on click"
;
        
        
$form = new Form($this);
        
        
$button = new Button($form);
        
$button->setValue("Validate")->onClick("onClickButton");
        
        
$form->setContent($button);
        
$this->render $form;
    }
    
    public function 
onClickButton($sender) {
        
$this->addObject(new JavaScript("alert('click');"));
    }
}
?>


Go back to tutorial of the componant Button


Share

 


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