PDA

View Full Version : Cross browser Marquee script trouble



daruhshie
04-10-2007, 02:35 PM
1) Script Title: Cross browser Marquee script

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

3) Describe problem: Script located in header of my page is working fine in both FF and IE the header is followed by three floating div's when I clear these div's at the bottom of the page the script doesn't work anymore in FF. As long as I don't clear these floating divides all is fine? How can this be related? :confused:

jscheuer1
04-10-2007, 03:31 PM
How can this be related?

You just related it. I think you mean remedied or fixed. For us to do that, it would help if you related the location of your page:

Please: Provide a link to your problem page.

daruhshie
04-10-2007, 05:58 PM
Here's the page I'm talking about, thanx for looking at this.

http://www.ludophilippaerts.be/dutch/niels_stoeterijdorperheide_horses_detail.php?horse=20070001

jscheuer1
04-11-2007, 05:55 AM
I still don't really know what you are talking about as, your demo page looks fine in FF. I made a local copy and added:


<div style="clear:both;"></div>

just before the closing </body> tag and still no problem in FF. I don't really see why you need to clear anything. Unless clearing adds to the pages appearance in a positive manner, there is no need for it.

One thing I can tell you though is - use thumbnails for your thumbnails.

daruhshie
04-11-2007, 08:26 AM
Hi John,

On line 489 you can find the <div> I'm talking about, removing the clear both in this <div> will cause the Marquee script to behave like it does in IE, leaving the clear both slows it down to almost nothing and the page seems to load a lot slower. problem is is that I need that clear to keep the layout intact.


http://www.ludophilippaerts.be/dutch/niels_stoeterijdorperheide_horses_detail.php?horse=20070001

jscheuer1
04-11-2007, 04:04 PM
I 'get it' now. That is strange and although there may be a simple explanation and fix, there may not be. What you do in the layout below the marquee really shouldn't be affecting it in this manner. However, you can make an adjustment to the speed, there are various ways but, this one should be sufficient (from your source code, changes red):


<script type="text/javascript">
/*
Cross browser Marquee script- Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/
//Specify the marquee's width (in pixels)
var marqueewidth="462px"
//Specify the marquee's height
var marqueeheight="16px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=document.body.filters? 1 : 5;
//configure background color:
var marqueebgcolor="transparent"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1
//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and ba . . .

The 1 is for IE and the 5 is for all others. You may prefer a 2 or a 3. It is up to you. I think it is safe to do it this way as, the marquee was also slow in Opera. This will speed it up there in Opera, in FF and as I say, for all non-IE browsers.

About the load time of the page. Not much could possibly be slowing that down more than loading all of the images. Use thumbnails and optimize them. One of the strengths of lightbox is that it doesn't require preloading of the larger images, by using those for its thumbnails, you defeat that feature.

Also, there appears to be some QuickTime (tm) loaded with the page. Consider replacing that with Flash (generally loads faster), or getting rid of it entirely.