Ajax problem - Script Only on one page should be site-wide

I’ve been trying to install a new shopping basket system to my wordpress site called Easy Basket. Eventually I’ve managed to get it up and running on preview pages and the homepage but the basket doesn’t display on any other pages!?

Apparently Firebug relays a 404 error file can not be found when Ajax Get tries to write the basket into the page.

Here is the coding installed into the head section

<link rel="stylesheet" href="/easybasket/skins/default.css" type="text/css"/>
<meta name="easybasket" content="showhide=yes" />
<script type="text/javascript" src="/easybasket/easybasket.js"></script>

My website is carp-fishing-reels.com Any help to get this working would be appreciated

You have a pathing problem.

An example of the 404 error is for this path:
http://carp-fishing-reels.com/bait-boats/easybasket/?skin=default.xsl

Thanks for your input Paul but I’m still baffled. Somehow missed this vital piece of code out from my first post:

<div class="easybasket" data-url="skin=default.xsl"></div>

This must be related to the pathing problem. I tried changing the data url to “http://carp-fishing-reels.com/easybasket/?skin=default.xsl” as this appears to be the right path and have a feeling it is to do with absolute linking, but it hasn’t worked.
Any ideas on how to fix?

Currently the location is designated as this, from the easy basket script:


var location = 'easybasket/'; // The location of the easybasket folder.

Is the solution as easy as putting a leading slash on that location?

Thanks Paul, the solution wasn’t quite that easy, but it set me off on the right lines. I had to ensure much of the backend stuff was absolute urls.

Now everything is working fine:cool: although that is what I thought last time…:blush: