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 : Context menu

Tutorials

>

Tutorial Menu

>

Tutorial : Context menu


Menu-05: Tutorial of the composant Menu of the PHP FrameWork WebSite-PHP.

Tutorial : Context menu:

Click right button


Go back to tutorial of the componant Menu



Source code

Source code


File: /pages/tutorials/menu/menu-05.php

<?php
class Menu05 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Context menu";
        
        
$menu_object = new WSPObject("Click right button");
        
$menu_object->setId("obj_menu_5");
        
$menu_object->setStyle("border:1px dashed gray;".
                                
"padding:5px;");
        
        
$context_menu = new ContextMenu("context_menu_5");
        
        
$context_menu->addItem("Menu 1"
                        
ContextMenu::CONTEXTMENU_ICON_LINK,
                        
$add_folder_event);
        
        
$menu_event = new ContextMenuEvent($this);
        
$menu_event->onClick("clickEvent")->setAjaxEvent();
        
$context_menu->addItem("Menu 2"
                        
ContextMenu::CONTEXTMENU_ICON_REDO,
                        
$menu_event);
        
        
$menu_object->setContextMenu($context_menu);
                                    
        
$this->render $menu_object;
    }
    
    public function 
clickEvent($sender$object) {
        
alert($object->getId());
    }
}
?>


Go back to tutorial of the componant Menu


Share

 


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