PDA

View Full Version : Need help identifying error in code


A Photographic Life
Dec-02-2009, 06:01 PM
My site is www.journeytreestudio.com. I recently updated some code and have no idea what I did wrong. My slideshow on the homepage will not load properly and I get an error message in internet explorer that says there are errors on the page after it loads. Would someone mind taking a look at it and offer any advice?

Any help would be appreciated.

Thank you

Jade

jfriend
Dec-02-2009, 06:33 PM
The error I see is in this code in your top javascript:


/*CHANGES 'GALLERY' TEXT TO 'GUESTBOOK'*/
function ModifyText ()
{if (YD.hasClass(document.body, "gallery_5211591"))
{var objElement = YD.get("comment")if (objElement != null)
{var str = new String(objElement.innerHTML);
str = str.replace(/\gallery/gi, 'guestbook');
objElement.innerHTML = str;}}}
YE.onAvailable("comment", ModifyText);

The code is missing at least some line breaks, some semi-colons and indentation to make it readable. I would suggest removing what you have here, verify that no errors are reported on your page, then go back to the source of this code and get a fresh copy.

FYI, your homepage slideshow isn't playing for me. I'm not sure why.