PHP Classes
elePHPant
Icontem

File: mycallbacks.php

Recommend this page to a friend!
  Classes of Jo Giraerts  >  cjEvents  >  mycallbacks.php  >  Download  
File: mycallbacks.php
Role: Auxiliary script
Content type: text/plain
Description: example callbacks
Class: cjEvents
Handle browser events in PHP
Author: By
Last change:
Date: 5 years ago
Size: 421 bytes
 

Contents

Class file image Download
<?php

function answerjsevent()
{
   
$args = func_get_args();

   
// $args[0] is always the eventname
    // the rest of the array-elements will be the arguments you gave to the raise-function
   
$eventname = $args[0];
   
$new_event = ($eventname == 'phpevent1' ? 'jsevent1' : 'jsevent2');

   
$handler = cjEventHandler::singleton();
   
$handler->raiseJSEvent($new_event, 'arg1', 'arg2', array('arg3', 'arg4'));
}