Jump to content


FrogJS Javascript Gallery Error


No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 18 December 2007 - 03:36 PM

I recently installed the FrogJs javascript slideshow on a client's website. From my experience I have a little tip for people who install this on a dynamic site, such as those using a Content Management System or forum.

If you add the code to the html section of your CMS template as instructed then you will get javascript errors on all pages that do not actually display the slideshow. This is not an issue with sites that are not template driven.

In the Firefox javascript console the error reads...

Quote

Error: $("FrogJS") has no properties

Source File: xxx
Line: 46
If you click the "Error on page" icon at the bottom left of IE (Internet Explorer) the error will look like this...

Quote

Line: 47
Char: 3
Error: 'null' is null or not an object
Code: 0
URL: xxx
The solution is simple...

Open frog.js

FIND:
if(!document.getElementsByTagName){ return; }
ADD BELOW:
if (!$('FrogJS')){ return; }
This should fix the errors and the slideshow still works great.

-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users