/    Sign up×
Community /Pin to ProfileBookmark

Hi,

I have a small problem with my menu slider ([url]www.ultramixrecords.pl[/url]). It’s not working in IE.

Based on java script code…

[CODE]NS6 = (document.getElementById&&!document.all);
IE = (document.all);
NS = (navigator.appName==”Netscape”&&navigator.appVersion.charAt(0)==”4″);
moving = setTimeout(‘null’,1);
var divobj, speed = 1;

function movediv(id,len) {
divobj = document.getElementById(id).style;
if(isNaN(parseInt(divobj.left))) divobj.left = “0px”;
elen = parseInt(divobj.left)+len;
moveit(len,elen);
return true;
}

function moveit(len,elen) {
if(((len>0)&&((NS6||NS)&&parseInt(divobj.left)<elen)||(IE&&divobj.pixelLeft<elen))
|| ((len<0)&&((NS6||NS)&&parseInt(divobj.left)>elen)||(IE&&divobj.pixelLeft>elen))) {
clearTimeout(moving);
moving = setTimeout(‘moveit(‘+len+’,’+elen+’)’,speed);
num=(len>0)?10:-10;
if (IE)
divobj.pixelLeft += num;
else if (NS6)
divobj.left = parseInt(divobj.left)+num+”px”;
else if (NS)
divobj.left = parseInt(divobj.left)+num;
} else {
clearTimeout(moving);
moving=setTimeout(‘null’,1);
}
}[/CODE]

…used in the site code:

[CODE]<div id=”menu”>
<div style=”position: absolute; right:5px; top:90px; cursor:pointer;”>
[COLOR=”Red”]<img src=”img/closer.png” id=”right” alt=”” title=”” style=”margin-right:-25px;”
onClick=”movediv(‘menu’,-document.width+30);
document.getElementById(‘right’).style.visibility=’hidden’;
document.getElementById(‘left’).style.visibility=’visible’;”>[/COLOR]

[COLOR=”Red”]<img src=”img/closel.png” id=”left” alt=”” title=”” onLoad=”document.getElementById(‘left’).style.visibility=’hidden’;”
onClick=”movediv(‘menu’,document.width-30);
document.getElementById(‘right’).style.visibility=’visible’;
document.getElementById(‘left’).style.visibility=’hidden’;”>[/COLOR]
</div>
<center>
<table cellpadding=”5″ cellspacing=”0″ id=”tabela”>
<tr>
<td>
<a href=”#”>Menu1</a><br>
<a href=”#”>Menu2</a><br>
<a href=”#”>Menu3</a><br>
<a href=”#”>Menu4</a><br>
</td>
<td width=”20″ class=”dzielnik”>&nbsp;</td>
<td>
<a href=”#”>Menu5</a><br>
<a href=”#”>Menu6</a><br>
<a href=”#”>Menu7</a><br>
<a href=”#”>Menu8</a><br>
</td>
<td width=”20″ class=”dzielnik”>&nbsp;</td>
<td>
<a href=”#”>Menu9</a><br>
<a href=”#”>Menu10</a><br>
<a href=”#”>Menu11</a><br>
<a href=”#”>Menu12</a><br>
</td>
<td width=”20″ class=”dzielnik”>
&nbsp;
</td>
<td class=”kursor”>
Corporate address
</td>
</tr>
</table>
</center>
</div>[/CODE]

Please help me ASAP.

Thank you.

JH

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @hustlereq spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...