how ajax site wide browsing works on phpfox? -


i'm trying use ajax wide browsing on phpfox dont understand how works, idea please ? found in static/jscript/main.js code :

$core.ajax = function(scall, $oparams)  { var sparams = '&' + getparam('sglobaltokenname') + '[ajax]=true&' +             getparam('sglobaltokenname') + '[call]=' + scall;  if (!sparams.match(/\[security_token\]/i)) {     sparams += '&' + getparam('sglobaltokenname') + '[security_token]=' +    ocore['log.security_token']; }  if (isset($oparams['params'])) {     if (typeof($oparams['params']) == 'string')     {         sparams += $oparams['params'];     }     else             {         $.each($oparams['params'], function($skey, $svalue)         {             sparams += '&' + $skey + '=' + encodeuricomponent($svalue) + '';         });     }        }  $.ajax( {     type: (isset($oparams['type']) ? $oparams['type'] : 'get'),     url: getparam('sjsstatic') + "ajax.php",     datatype: 'html',     data: sparams,     success: $oparams['success'] });   }; 

i'm trying fix module of chat while browsing on site idea plz ?

to make link site wide ajax browsing usual, phpfox figure out you.

if want make ajax call in phpfox do:

$.ajaxcall('module.function', 'param1=value1&param2=value2'); 

for example:

$.ajaxcall('ad.recalculate', 'total=' + itotal + '&location=' + slocation + '&block_id=' + sblockid + '&iscpm=' + $core.ad.iscpm); 

calls function recalculate in file /module/ad/include/component/ajax/ajax.class.php , passes params: total, location, block_id , iscpm


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -