nickdclements
Technical User
below is an example of what i am trying to do. i would like to be able to enter variables into the javascript when calling the function:
--
--
Code:
--------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>javascript div slider</title>
<script type="text/javascript">
var x=50;
function slideDown() {
document.getElementById(' ? ').style.top=x+"px";
if(x>= ? ) {clearTimeout(timer1);}
else {x++; timer1=setTimeout(function(){slideDown()},15);}
}
</script>
</head>
<body>
<div id="red" style="position:absolute; width:50px; height:50px; top:50px; background-color:#F00;"></div>
<div id="blue" style="position:absolute; width:50px; height:50px; top:50px; left:100px; background-color:#00F;"></div>
<a href="#" onclick="slideDown('red',100);return false">red</a>
<a href="#" onclick="slideDown('blue',200);return false">blue</a>
</body>
</html>
--[code]--------------------------------------------------------
thanks for your thoughts...