File: templates/plugins/confirm.js.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu  >  Jaxon  >  templates/plugins/confirm.js.php  >  Download  
File: templates/plugins/confirm.js.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Jaxon
Call PHP classes from JavaScript using AJAX
Author: By
Last change: Changed js code generation feature.

There is a separation between js code which can be exported in external files and js code which must be inlined in HTML code.
Date: 1 year ago
Size: 1,442 bytes



Class file image Download
jaxon.confirm = {
    skip: function(command) {
        numberOfCommands =;
        while (0 < numberOfCommands) {
    Function: jaxon.confirm.commands

    A rewrite of the jaxon.confirm.commands function which uses the user configured confirm library.

        command (object) - jaxon response object

        true - The operation completed successfully.
jaxon.confirm.commands = function(command) {
    command.fullName = 'confirmCommands';
    var msg =;
     * Unlike javascript confirm(), third party confirm() functions are not blocking.
     * Therefore, to prevent the next commands to run while the library is waiting for the user confirmation,
     * the remaining commands are moved to a new queue in the command object.
     * They will be processed in the confirm callbacks.
     * Note that only one confirm command will be allowed in a Jaxon response.
    command.response =;
    while((obj = != null)
    {, obj);
        delete obj;
    <?php echo $this->sQuestionScript ?>;
    return true;

jaxon.dom.ready(function() {
    jaxon.command.handler.register("cc", jaxon.confirm.commands);

For more information send a message to info at phpclasses dot org.