PHP Classes
elePHPant
Icontem

File: templates/plugins/config.js.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu  >  Jaxon  >  templates/plugins/config.js.php  >  Download  
File: templates/plugins/config.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: Implemented file upload without Ajax.
Date: 1 year ago
Size: 1,392 bytes
 

 

Contents

Class file image Download
try {
    if(typeof jaxon.config == undefined)
        jaxon.config = {};
}
catch(e) {
    jaxon = {};
    jaxon.config = {};
};

jaxon.config.requestURI = "<?php echo $this->sRequestURI ?>";
jaxon.config.statusMessages = <?php echo $this->sStatusMessages ?>;
jaxon.config.waitCursor = <?php echo $this->sWaitCursor ?>;
jaxon.config.version = "<?php echo $this->sVersion ?>";
jaxon.config.defaultMode = "<?php echo $this->sDefaultMode ?>";
jaxon.config.defaultMethod = "<?php echo $this->sDefaultMethod ?>";
jaxon.config.responseType = "<?php echo $this->sResponseType ?>";
<?php if($this->nResponseQueueSize > 0): ?>
jaxon.config.responseQueueSize = <?php echo $this->nResponseQueueSize ?>;
<?php endif ?>
<?php
if(($this->bDebug)): ?>
<?php
if(($this->sDebugOutputID)): ?>
jaxon.debug.outputID = "<?php echo $this->sDebugOutputID ?>";
<?php endif ?>
<?php
if(($this->bVerboseDebug)): ?>
jaxon.debug.verbose.active = true;
<?php endif ?>
<?php
endif ?>
<?php
if(($this->sCsrfMetaName)): ?>
metaTags = document.getElementsByTagName('meta');
for(i = 0; i < metaTags.length; i++)
{
    if(metaTags[i].getAttribute('name') == '<?php echo $this->sCsrfMetaName ?>')
    {
        if((csrfToken = metaTags[i].getAttribute('content')))
        {
            jaxon.config.postHeaders = {'X-CSRF-TOKEN': csrfToken};
        }
        break;
    }
}
<?php endif ?>

<?php echo $this->sConfirmScript ?>