PDA

View Full Version : Having trouble getting Frog JS to work



ccgal228
11-06-2007, 07:17 PM
1) Script Title: Frogjs

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/frogjs/index.htm

3) Describe problem:

I copied the code from the dynamicdrive site as outlined on the page above and inserted this into my head and body of html. I also copied the JS scripts and sample pictures. However, when I run the script only thumbprints appear, the pictures do not display as shown on your sample - a thumbprint for previous, an enlarged picture in the middle and a thumbprint for next. I have reviewed other people questions who have asked for help on your forum for Frogjs, but I don't seem to have the problem that were identified with their scripts. You can see what I am getting by going to http://www.naughtydawgband.com/phototrial.htm

I also notice that an error appears at the bottom of the screen as follows when this page is displayed:

Line 52
Char 4
Error : 'getElementsBy TagName(...)0' is null or not an object
Code 0
URL: http://www.naughtydawgband.com/phototrial.com

I'm assuming there may be an issue with JS script, but I'm not a JS coder.

Can you point me in the right direction?

Thank You.

jscheuer1
11-07-2007, 05:42 AM
Well, you haven't made the loading image available to the script, see:

http://www.dynamicdrive.com/forums/showthread.php?t=26395

But the main problem is no closing > for the first a tag:


<div id="FrogJS">
<a href="1.jpg" title="Jolie Myers / The State News"
<img src="1_thumb.jpg" alt="An attendee of Rabbi Hendel Weingarten's Purim service at Chabad House on Elizabeth Street in East Lansing uses a noisemaker after the name of Haman is read. Purim is a Jewish holiday that celebrates the deliverance of the Jews from an evil plot conceived by Haman, as chronicled i

It should be like:


<div id="FrogJS">
<a href="1.jpg" title="Jolie Myers / The State News">
<img src="1_thumb.jpg" alt="An attendee of Rabbi Hendel Weingarten's Purim service at Chabad House on Elizabeth Street in East Lansing uses a noisemaker after the name of Haman is read. Purim is a Jewish holiday that celebrates the deliverance of the Jews from an evil plot conceived by Haman, as chronicled i

You should also use a valid URL DOCTYPE, like so:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>

<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascr . . .

At the start of your page.