PDA

View Full Version : Image Crawler "marqueeInit is not defined" error



mikegw
08-25-2010, 08:13 PM
1) Script Title: Text and Image Crawler

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

3) Describe problem: I'm trying to get the Image Crawler script to work on my Zencart site but all I get is marqueeInit is not defined. The images show up but they dont move.

My website is http://canyonawards.com

I'm not sure if I have the code in the right files. Any help would be greatly appreciated.

html_header.php
[CODE]
<script type="text/javascript" src="crawler.js">
/*
Text and/or Image Crawler Script 2009 John Davenport Scheuer
as first seen in http://www.dynamicdrive.com/forums/ username: jscheuer1
This Notice Must Remain for Legal Use
*/
</script>
[CODE]

define_main_page.php
[CODE]
<div class="marquee" id="mycrawler2">

<a href="index.php?main_page=index&cPath=65"><img title="Plaques" src="crawler/images/01.jpg" /></a>
<a href="index.php?main_page=index&cPath=78"><img title="Acrylic Awards" src="crawler/images/02.jpg" /></a>
<a href="index.php?main_page=index&cPath=77"><img title="Crystal Awards" src="crawler/images/03.jpg" /></a>
<a href="index.php?main_page=index&cPath=113"><img title="Cast Awards" src="crawler/images/04.jpg" /></a>
<a href="index.php?main_page=index&cPath=81"><img title="Clocks" src="crawler/images/05.jpg" /></a>
<a href="index.php?main_page=index&cPath=117"><img title="Art Glass" src="crawler/images/06.jpg" /></a>
<a href="index.php?main_page=index&cPath=119"><img title="Eco Friendly" src="crawler/images/07.jpg" /></a>
<a href="index.php?main_page=index&cPath=118"><img title="Plate Awards" src="crawler/images/08.jpg" /></a>
<a href="index.php?main_page=index&cPath=73"><img title="Gifts" src="crawler/images/09.jpg" /></a>
<a href="index.php?main_page=index&cPath=108"><img title="Eagles, Heros & Military" src="crawler/images/10.jpg" /></a>
<a href="index.php?main_page=index&cPath=112"><img title="Gavels" src="crawler/images/11.jpg" /></a>
<a href="index.php?main_page=index&cPath=71"><img title="Sports" src="crawler/images/12.jpg" /></a>
<a href="index.php?main_page=index&cPath=75"><img title="Victory Cups" src="crawler/images/13.jpg" /></a>
<a href="index.php?main_page=index&cPath=142"><img title="Academic Awards" src="crawler/images/14.jpg" /></a>
</div>

<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
'padding': '100px 0',
'width': '100%',
'height': '180px'
},
inc: 5, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true
});

</script>
*/
</script>
[CODE]

azoomer
08-25-2010, 08:23 PM
Right now the path to the crawler.js is not working.

mikegw
08-25-2010, 08:39 PM
Azoomer you are a genius. That worked.

Do you happen to know how to remove the white space above and below the crawler?

Thanks
Mike

azoomer
08-25-2010, 09:59 PM
maybe you could try to adjust this part ( red)

<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
'padding': '100px 0',
'width': '100%',
'height': '180px'
},
inc: 5, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true
});
</script>

mikegw
08-26-2010, 04:20 PM
Hi Azoomer,

I changed 'padding': '100px 0',

to 'padding': '2px', and it works great.

Thanks for your help.

Mike

mikegw
08-30-2010, 08:59 PM
Hi Azoomer,

One more thing, do you know how to add a caption under each image?

Thanks
Mike

azoomer
08-30-2010, 09:19 PM
Hi I am not sure if this is the right way to do it but you could take a look at this thread
http://www.dynamicdrive.com/forums/showthread.php?t=56354
I think she got it working eventually although I'm not sure how it looks in IE. If you go to her main domain you can see an example