PDA

View Full Version : marqueeInit



star107
01-11-2010, 03:18 AM
I found marqueeInit at:
http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm

I try to use it on my source code :


<div class="marquee0" id="mycrawler23">
<span class="category_r_text"><a href="#">aaaaaaaaaaaaaaaaaaaaaaaaaaaa</a></span>
<span class="category_r_text"><a href="#">bbbbbbbbbbbbbbbbbbbbbbbbbbbb</a></span>
<span class="category_r_text"><a href="#">cccccccccccccccccccccccccccc</a></span>
<span class="category_r_text"><a href="#">ddddddddddddddddddddddddfddd</a></span>
<span class="category_r_text"><a href="#">eeeeeeeeeeeeeeeeeeeeeeeeeeee</a></span>
<span class="category_r_text"><a href="#">ffffffffffffffffffffffffffff</a></span>
<span class="category_r_text"><a href="#">gggggggggggggggggggggggggggg</a></span>
<span class="category_r_text"><a href="#">hghhhhhhhhhhhhhhhhhhhhhhhhhh</a></span>
<span class="category_r_text"><a href="#">iiiiiiiiiiiiiiiiiiiiiiiiiiii</a></span>
</div>

<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler23',
style: {
'padding': '0px',
'width': '805px',
'height': '235px'
},
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
});


with css:
.category_r_text{
width:204px;
height:24px;
margin-right:3px;
margin-top:3px;
background:#9c0001;
}
.category_r_text a{
text-decoration:none;
color:#FFFFFF;
}
.category_r_text a:hover{
text-decoration:underline;
}

It work well on firefox and chrome but it doesn't work on IE7 (sometime it work but some time it doesn't work.)

When it doesn't work, it show nothing, event a word.

jscheuer1
01-11-2010, 05:10 AM
It should be marquee, not marquee0:


<div class="marquee0" id="mycrawler23">
<span class="category_r_text"><a href="#">aaaaaaaaaaaaaaaaaaaaaaaaaaaa</a></span>
<span class="category_r_text"><a href="#">bbbbbbbbbbbbbbbbbbbbbbbbbbbb</a></span>
<span class="category_r_text"><a href="#">cccccccccccccccccccccccccccc</a></span>
<span class="catego . . .

But I don't really see how that would stop it from working in IE. That just helps with the setup of the crawler while the page loads, reserving space for it without showing anything until the images are loaded. But with a text only crawler like you have, that's not really a consideration.

Now, I setup a demo using the code, including the css from your post and couldn't get it to not work in IE 7. Probably there is more to it than that. If so:

Please post a link to the page on your site that contains the problematic code so we can check it out.

One thing though, for IE you should make sure to use a valid URL DOCTYPE like:


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

or:


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

as the very first thing on your page, before the opening <html> tag.

duche
03-28-2011, 09:59 PM
Hi John,

i have tried your script and it work fine on Firefox or Safari but it doesn't on Internet Explorer.
Here is the website url :

http://www.brocatelle.eu/accueil.php

thanks for help

jscheuer1
03-29-2011, 12:46 AM
There are many (I believe it's 15) unclosed <a> tags in the mycrawler2 div, example:


<div class="marquee" id="mycrawler2">
<a href="http://www.brocatelle.eu/marbre.html"><img src="http://www.brocatelle.eu/banner/001.jpg"> <a href . . .

It should be (addition red):


<div class="marquee" id="mycrawler2">
<a href="http://www.brocatelle.eu/marbre.html"><img src="http://www.brocatelle.eu/banner/001.jpg"></a> <a href . . .

Fix that one and the rest and all will be well.

duche
03-29-2011, 06:29 AM
Thank you very much John, i will try it asap.

All the best.

Alain