PDA

View Full Version : Resolved static slide out menu - require to be cross-browser


tpeck
10-21-2010, 03:33 AM
1) Project Details:

I have a page that I have stripped to the part which does not function in anything but i.e.

The part which does not work is a static floating menu that expands when clicked.

2) Payment Amount:

I am willing to pay whatever is reasonable.

3) Payment method/ details (Paypal, check? Timeline?):

No timeline, but I can pay by PayPal.

4) Additional Info (about project or potential bidders):


<html>

<head>
<title></title>
<script>
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0
var master = new Object("element")
master.curLeft = 0; master.curTop = 10;
master.gapLeft = 0; master.gapTop = 0;
master.timer = null;

function moveAlong(layerName, paceLeft, paceTop, fromLeft, fromTop){
clearTimeout(eval(layerName).timer)

if(eval(layerName).curLeft != fromLeft){
if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft}
else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft}
else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft}
if(ie){document.all[layerName].style.left = eval(layerName).curLeft}
if(ns){document[layerName].left = eval(layerName).curLeft}
}

if(eval(layerName).curTop != fromTop){
if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
if(ie){document.all[layerName].style.top = eval(layerName).curTop}
if(ns){document[layerName].top = eval(layerName).curTop}
}

eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30)
}

function setPace(layerName, fromLeft, fromTop, motionSpeed){
eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed
eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed

moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop)
}

var expandState = 0

function expand(){
if(expandState == 0){setPace("master", 121, 10, 10);expandState = 1;}
else{setPace("master", -120, 10, 10);expandState = 0;}
}

</script>
</head>

<body>

<div id="master" style="position: absolute; left: -120px; top: 11px; width: 350px; height: 0px">
<div id="menu" style="position: absolute; left: 117px; top: 12px">
<table border="0" width="18" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<a href="javascript:expand();" onfocus="this.blur()">
<img name="menutop" border="0" src="../../img/translate.gif" width="23" height="152"></a></td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
if(ie){var sidemenu = document.all.master;}
if(ns){var sidemenu = document.master;}
function FixY(){
screenWidth = screen.width;
if (screenWidth == 1024){
var yside = 390;
}
else if (screenWidth == 1152){
var yside = 400;
}
else if (screenWidth == 1280){
var yside = 400;
}
else{
var yside = 500;
}
if(ie){sidemenu.style.top = document.body.scrollTop+yside}
if(ns){sidemenu.top = window.pageYOffset+10}
}
setInterval("FixY()",100);
</script>
<div align="center">
<center>
<table border="1" cellpadding="10" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="1000">
<tr>
<td valign="top"><center>fixed slide out menu</center></td>
</tr>
</table>
</center></div>

</body>

</html>


Thanks!

_Aerospace_Eng_
10-22-2010, 02:13 AM
Did you want someone to update it (rewrite it) or just getting it working? The reason it only works in IE is because it is outdated and IE still understands document.all. I can do it for 15USD.

tpeck
10-22-2010, 04:03 AM
Thanks _Aerospace_Eng_ - it's yours.

I would like it to be rewritten I think, if that makes it easier for you too, so that it functions in at least FF and Chrome.

Is PayPal OK? I need your email right?