Go Back   CodingForums.com > Web Projects and Services Marketplace > Web Projects > Small projects (quick fixes and changes)

Notices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-21-2010, 03:33 AM   PM User | #1
tpeck
Regular Coder

 
tpeck's Avatar
 
Join Date: Oct 2002
Location: Sydney, Australia
Posts: 780
Thanks: 41
Thanked 5 Times in 4 Posts
tpeck is on a distinguished road
static slide out menu - require to be cross-browser

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):

Code:
<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!
__________________
The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

Last edited by tpeck; 10-22-2010 at 03:15 PM..
tpeck is offline   Reply With Quote
Old 10-22-2010, 02:13 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||

Last edited by _Aerospace_Eng_; 10-22-2010 at 02:26 AM..
_Aerospace_Eng_ is offline   Reply With Quote
Old 10-22-2010, 04:03 AM   PM User | #3
tpeck
Regular Coder

 
tpeck's Avatar
 
Join Date: Oct 2002
Location: Sydney, Australia
Posts: 780
Thanks: 41
Thanked 5 Times in 4 Posts
tpeck is on a distinguished road
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?
__________________
The difference between genius and stupidity is that genius has its limits. (Albert Einstein)
tpeck is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:32 PM.


Advertisement
Log in to turn off these ads.