0

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("getShoutboxMessages", arguments, 1);} function xajax_addShoutOut(){return xajax.call("addShoutOut", arguments, 1);}

Any ideas?

Dan Grossman
  • 51,866
  • 10
  • 112
  • 101
Norbert
  • 2,741
  • 8
  • 56
  • 111

2 Answers2

0

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.

Dan Grossman
  • 51,866
  • 10
  • 112
  • 101
0

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'

piddl0r
  • 2,431
  • 2
  • 23
  • 35
  • I found a xajax folder, but I can't find the script that includes it (and this is on the old server). – Norbert Dec 15 '10 at 13:19
  • if you have a look the webserver logs, it should say which script makes the call. If it's on the older server but not the new one, put it in the same place on the new server (relative to the document root). – piddl0r Dec 15 '10 at 13:23