开发者

phpFox: ShoutBox Stopped Working After Switching Servers

I moved a phpFox site to a different server and the shoutbox stopped working. According to the Chrome debugger:

Uncaught ReferenceError: xajax_addShoutOut is not defined
(anonymous function)community:451
onsubmit

I noticed that a few lines were missing from the new site's <head>, but I have no idea where they go.

var xajaxRequestUri="http://domain.com/community/public/"; var xajaxDebug=false; var xajaxStatusMessages=false; var xajaxWaitCursor=false; var xajaxDefinedGet=0; var xajaxDefinedPost=1; var xajaxLoaded=false; function xajax_latestVideos(){return xajax.call("latestVideos", arguments, 1);} function xajax_getShoutboxMessages(){return xajax.call("getS开发者_如何学GohoutboxMessages", arguments, 1);} function xajax_addShoutOut(){return xajax.call("addShoutOut", arguments, 1);}

Any ideas?


Add them where they were on the old server. If you don't remember, check archive.org or Google/Bing's search cache of your page.


It looks like xajax isn't on the new server, or it's in a different location. Have a look in your php scripts for an include 'xajax.inc.php' that's where it's expecting to find xajax.

Those lines missing from head are generated by xajax, you don't add them yourself.

$xajax = new xajax();
$xajax->getJavascript();

Is required in the php script to generate the JavaScript needed to define 'xajax_addShoutOut'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜