Welcome to WebmasterWorld Guest from

Forum Moderators: travelin cat

Message Too Old, No Replies

sliding a div layer using js not working in IE 5.2

IE5.2 hates me

9:25 pm on Oct 2, 2006 (gmt 0)

New User

10+ Year Member

joined:Oct 2, 2006
votes: 0

Can anyone help, I've created a layer to act as a mask and another layer within it that slides left or right to show different images. The layer animates as intended in IE6 and firefox but not IE5.2 for mac (or navigator 7.0 but I've given up on NN). I don't own a mac and it's killing me

The function is called from a link:

<a href="#" onclick="slideActiveLayer('down',20,100,0.5); return false;">up image</a>

and these functions do the slide: (I haven't coded js for a while so I'm rusty)
function slideActiveLayer(direction,steps,intervals,powr){
if(slideflag) return;
slideflag = true;
var width = parseInt(activeLayer.style.width)-273;
var currentleft = parseInt(activeLayer.style.left);
var endPos = currentleft;
if((width+currentleft)<1){slideflag = false;return;}
if(currentleft==0){slideflag = false;return;}
function doLayerSlide(startPos,endPos,steps,intervals,powr) {
if (activeLayer.timer)window.clearInterval(activeLayer.timer);
var counter = 0;
activeLayer.timer = window.setInterval(
function() {
activeLayer.style.left = easeInOut(startPos,endPos,steps,counter,powr)+'px';
if (counter > steps) {
slideflag = false;
slideflag is just a boolean variable to stop the animation being called again until it has finished running and easeInOut is'nt really relevant.

Any help would be really appreciated, I'm going to start pulling hair out soon. Cheers

[edited by: jatar_k at 2:56 am (utc) on Oct. 3, 2006]
[edit reason] no urls thanks [/edit]

7:20 pm on Oct 3, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
votes: 0

I know this isn't an answer to your question, but Internet Explorer for the Mac is a dead product. Microsoft officially ended supporting it December 31st, 2005 [webmasterworld.com].

If you are "stuck" because the client uses it, you may want to encourage them to transition to a different browser. If the manufacturer doesn't even support it, it makes a difficult case for developers to support it.