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¶m2=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
Post a Comment