PDA

View Full Version : Conveyor Belt + IE



holobyted
05-31-2005, 06:44 AM
I'm using the Conveyor Belt script (http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm) and it's all going perfect. However, I just ran it w/ IE (I usually run Firefox) and noticed that it doesn't start at the same position and also, when a cycle is done, the remaining images from the last cycle get erased.

Main problem is, it runs fine when outside the main site. When ran from main site, the mentioned problem occurs.

Example URLs: removed urls

Thanks.

-h


[edit: I'm also using the exact same code for both pages... only one is inside a nested table and the other isn't - but I've already tried that]

holobyted
06-01-2005, 02:15 AM
Oh my god, I hate IE. All that trouble and it was just "text-align: justify" that was doing it. :(


Hope someone else can use this to their advantage :p

ZZR600
06-03-2005, 02:30 AM
I am running this script too on one of my websites and I was wondering if I can define the width of the script in percent rather than pixels so that it appears right across the screen on any sized monitor.

heres the site (its a test page I created) Test Page (http://www.thebristolpropertycentre.co.uk/atestpage.htm)

jscheuer1
06-03-2005, 03:47 AM
There is a problem with using percentages with this and many other scripts. The initialization of the script relies upon pixel dimensions. Percentage can be converted to pixels but, in order to behave like a true percentage width, the page must be reloaded when resized, like the way a percentage width changes when a window is resized. If reloading your page when resized will not cause other problems, simply insert this unit into the current script, just below the do not edit line:


var ie=document.all && !window.opera
function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

if (((typeof(window.onresize))==('object')||('undefined'))&&(sliderwidth.indexOf('%')!==-1))
window.onresize=refresh;
function refresh() {
setTimeout("doit()",1)
}
function doit(){
if (window.location.reload)
window.location.reload( true );
else if (window.location.replace)
window.location.replace(unescape(location.href))
else
window.location.href=unescape(location.href)
}

if (sliderwidth.indexOf('%')!==-1)
var sliderwidth=ie? (iecompattest().clientWidth*parseInt(sliderwidth)/100)-20+'px' : (window.innerWidth*parseInt(sliderwidth)/100)-20+'px'Then the script will accept percentage widths and behave accordingly.

ZZR600
06-03-2005, 10:03 AM
many thanks for trying but I cant get it to work, it keeps saying theres a runtime error on a line Error expected ':'

I appreciate your efforts though, Thankyou

jscheuer1
06-03-2005, 11:25 AM
Works fine here in IE6 and FF1.0.4, what browser are you using?

ZZR600
06-03-2005, 08:20 PM
IE6, It's ok I've probably done something wrong (did I mention that I know absolutely nothing about html or anything of that kind.)

I've got it working on THIS PAGE (http://www.thebristolpropertycentre.co.uk) now and that will have to do I suppose.(It's better than it was)

Looks a bit out of place on a 17" tft though.

Many Thanks for your efforts though.

jscheuer1
06-03-2005, 09:09 PM
I just downloaded your page and it has some problems but, none that prevented our scheme from working. However, since other material on the page is of a fixed width, resizing below a certain width caused the conveyor to be at 100% of the window, not the page. This is only a problem in IE, not Mozilla, and only if users scroll to see the hidden content, if they resize, no problem. Here is an archive of your updated page, although it worked fine with my original suggestions, I've added some refinements to suit the page:

ZZR600
06-08-2005, 12:00 PM
Sorry about the delay in replying, I've been at work.

Many Thanks that is absolutely what I wanted, I can't thank you enough.