PDA

View Full Version : Chrome display wrong with crawler



TheGene
01-23-2013, 07:05 PM
1) Script Title: Text and Image Crawler v1.53

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

3) Describe problem: I use this to scroll images on my site and it works great in Firefox and Waterfox, however in Chrome this happens: ( screenshot)

4897

(it pushes the images beyond the screen on the right and just sits there)

My code I can post if u will just tell me what u need to see....

atm the script I use is this :


<!--recommended -->
<script type="text/javascript" src="js/crawler.js">
<script type="text/javascript" src="js/jquery.min.js">

/* Text and/or Image Crawler Script v1.53 (c)2009-2011 John Davenport Scheuer
as first seen in http://www.dynamicdrive.com/forums/
username: jscheuer1 - This Notice Must Remain for Legal Use
*/

</script>
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
},
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,
direction: 'left',
random: false
});
</script>
<!--recommended -->


Thanks, TG

jscheuer1
01-24-2013, 04:46 AM
The only things I can tell from that code are that the HTML comments are invalid. That's probably not the problem, but they may as well be fixed. The two:



<!--recommended -->

should be:


<!-- recommended -->

with an added space before the word recommended.

And that there's an extra half of a script tag here:


<script type="text/javascript" src="js/crawler.js">
<script type="text/javascript" src="js/jquery.min.js">

/* Text and/or Image Crawler Script v1.53 (c)2009-2011 John Davenport Scheuer
as first seen in http://www.dynamicdrive.com/forums/
username: jscheuer1 - This Notice Must Remain for Legal Use
*/

</script>

Get rid of it.

Fix both of those comment tags and get rid of the extra script tag and refresh the page. If that doesn't fix it we would need a link to the page.

TheGene
01-24-2013, 08:24 AM
Ok, fixed the tags and removed the extra scrpit, still have the same problem though.....

heres the link: http://torserver.sytes.net Login as Tinkles with p/w of tonkles

the theme in question is NB-52

on the other themes it doesnt over run the page, it just sits there and shudders lol...

I also notice that even though the direction is set to 'left' the display in FF and Waterfox crawls left, and then reverses to crawl right again, then left again..... ??

jscheuer1
01-24-2013, 03:10 PM
The crawler script isn't being used on that page for at least three reasons:


All of this:


<script type="text/javascript" src="scripts/ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 320;
NcodeImageResizer.MAXHEIGHT = 200;

NcodeImageResizer.Msg1 = 'Click this bar to view the full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click this bar to view the small image.';
//-->
</script>

<!-- recommended -->
<script type="text/javascript" src="js/crawler.js">

/* Text and/or Image Crawler Script v1.53 (c)2009-2011 John Davenport Scheuer
as first seen in http://www.dynamicdrive.com/forums/
username: jscheuer1 - This Notice Must Remain for Legal Use
*/

</script>
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
},
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,
direction: 'left',
random: false
});
</script>
<!-- recommended -->

comes before the opening <head> tag so is ignored.


There is no content on the page with the uniqueid 'mycrawler2'.


The way crawler works is that even if the scripts were being used and there were crawler content on the page with that id, the marqueeinit part of the script must come after that content.


You might then ask, "What's making the images move then?"

The page has a marquee tag:


<td width='100%'><div class='f-con'><marquee scrollAmount=3 onmouseover=this.scrollAmount=0 onmouseout=this.scrollAmount=3 scrolldelay=0 direction=MARQUEE BEHAVIOR=ALTERNATE><table align=cen . . .

And BEHAVIOR=ALTERNATE is why it moves back and forth in those browsers you mention. The fact that it moves off the screen in Chrome is probably due to the HTML/CSS formatting of the page.

But I repeat, this has nothing to do with the Crawler Script, which is not in use on that page.

If you really want to use the Crawler Script, go back to the demo page and follow the step by step instructions for its use. If you're still having problems, I'll have another look.

TheGene
01-24-2013, 04:54 PM
Mate I apologise, when digging into code further I found they had a whole batch of code inserted into index.php.....

I redid this, incidentally removing the alternat scroll etc. and replacing with simply : print("<table align=center cellpadding=0 cellspacing=0 width=99% border=0 class=marquee id=mycrawler2><tr>");

and ... voila! Everything is working the way it should.... there was also a </marquee> that I removed, and like I say, chrome is good now, I can set the settings in the script file and they are being executed correct, thanks a lot, if not for your knowledge I wouldnt have found the problem area....


GREAT application this, works really beautifully....