Location: PHPKode > projects > PHP Ajax Forms Framework > pajff/pajff_dialogs.php
<?php
/**
* Built-in dialog window functions
* 
* <p>Functions to generate modal dialog windows handled by
* the framework.</p>
* 
* {@link http://sourceforge.net/projects/pajff Project home}
* 
* @package PAjFF
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @author Atanas Markov hide@address.com
* @version 0.0.2
* @copyright 2006 by Atanas Markov
*
* @subpackage pajff_dialogs
**/

/**
 * A modal dialog with OK button in it
 *
 * @param pajff_session $session the session that called the dialog
 * @param string $message message text
 * @param string $title window title
 * @return pajff_form
 */
function pajffDialogOk($session,$message='',$title=''){
    $result= new pajff_form('pajffok',$session);
    $result->session->message= $message;
    $result->session->title= $title;
    return $result;
}

/**
 * A modal yes/no dialog. This dialog returns <i>yes</i> or <i>no</i>
 * to an event handler for $resultevent of the calling form.
 *
 * @param pajff_session $session the session that called the dialog
 * @param string $message message text
 * @param string $title window title
 * @param string $resultevent event name to trigger on exit
 * @return pajff_form
 */
function pajffDialogYesNo($session,$message='',$title='',$resultevent='yesno'){
    $result= new pajff_form('pajffyesno',$session);

    $result->session->message= $message;
    $result->session->title= $title;
    $result->session->resultevent= $resultevent;

    return $result;
}

?>
Return current item: PHP Ajax Forms Framework