scripatculous help
Please if anyone can tell me why this damn thing is not working please let me know asap.
Basically scriptaculous is not working and in the error console is telling me "element.down() is null"
Here is my simple page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="scriptaculous/lib/prototype.js"></script>
<script type="text/javascript" src="scriptaculous/src/scriptaculous.js"></script>
<script type="text/javascript">
function toggleDiv(){
Effect.SlideUp('thediv');
return false;
}
</script>
<style type="text/css">
#thediv{
width:300px;
height:250px;
background:red;
}
</style>
</head>
<body>
<span onClick="toggleDiv();">ToggleDiv</span>
<div id="thediv"></div>
</body>
</html>
I have checked the path to scriptaculous about 1000 times, this has been boggling me for around 1 hour - a simple slideUp or BindUp
pr0gr4mm3r posted this at 13:52 — 11th January 2009.
He has: 1,502 posts
Joined: Sep 2006
Can you link this to a live page?
decibel.places posted this at 15:24 — 11th January 2009.
He has: 1,494 posts
Joined: Jun 2008
Yeah, to test a fix, I would need to repeat your structure with the script libraries... a live page would really help
here's a shot in the dark - I'm not familiar with your function, but I wonder if removing "return false;" or changing it to "return true;" would have any effect?
function toggleDiv(){
Effect.SlideUp('thediv');
return false;
}
benf posted this at 12:50 — 12th January 2009.
They have: 426 posts
Joined: Feb 2005
Rather than using a fresh download of the scripts, i copied a current copy of scriptaculous over and it works. Perhaps there is a bug the current download?
Good Value Professional VPS Hosting
greg posted this at 20:22 — 14th January 2009.
He has: 1,581 posts
Joined: Nov 2005
Or an error in the file transfer.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.