blizeH
05-13-2008, 08:39 AM
Hi,
I'm currently using Litebox (http://www.doknowevil.net/litebox/)on a few pages of my site, called in via a Javascript if statement, checking if the item 'profilepic' is on the page:
function checklightbox() {
if(document.getElementById('profilepic')) { initLightbox(); }
}
This is fine, except on one of the pages there's a list of links that'll change the picture that's displayed, so as soon as you click the link, and the ajax calls in the new picture, the Litebox script doesn't work at all, as if it isn't initialised on that page, and Firebug says:
myLightbox is not defined
[Break on this error] anchor.onclick = function () {myLightbox.start(this); return false;}
Any help or advice on how to get this working would be fantastic.
Cheers
I'm currently using Litebox (http://www.doknowevil.net/litebox/)on a few pages of my site, called in via a Javascript if statement, checking if the item 'profilepic' is on the page:
function checklightbox() {
if(document.getElementById('profilepic')) { initLightbox(); }
}
This is fine, except on one of the pages there's a list of links that'll change the picture that's displayed, so as soon as you click the link, and the ajax calls in the new picture, the Litebox script doesn't work at all, as if it isn't initialised on that page, and Firebug says:
myLightbox is not defined
[Break on this error] anchor.onclick = function () {myLightbox.start(this); return false;}
Any help or advice on how to get this working would be fantastic.
Cheers