...

View Full Version : Scriptaculous easy problem.



noPCtoday
07-19-2007, 02:43 AM
I wrote a simple code to test scriptaculous, no matter what I change, it still wont run. Even this simplest one...





<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<script src="/js/prototype.js"></script>
<script src="/js/scriptaculous.js"></script>

<script language="javascript" type="text/javascript">
<!--
function lol()
{
alert ("test");
Effect.SlideUp("Random");
}

-->
</script>
</head>

<body onload="lol();">
<div style="background-color:black; width:200px; height:200px;" id="Random"><div>lollolollllllollllllll</div>
</div>
</body>
</html>

_Aerospace_Eng_
07-19-2007, 03:08 AM
I'm not sure what you are trying but this works fine for me.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script src="lib/prototype.js" type="text/javascript"></script>
<script src="src/scriptaculous.js" type="text/javascript"></script>
<script type="text/javascript">
function lol()
{
alert ("test");
Effect.SlideUp('Random')
}
window.onload = lol;
</script>
</head>
<body>
<div style="background-color:black; width:200px; height:400px" id="Random">
<div>lollolollllllollllllll</div>
</div>
</body>
</html>

What prototype are you using? v1.5 is the one that works with the stable build of Scriptaculous

noPCtoday
07-19-2007, 05:26 AM
I've replaced the latest prototype library with the one was giving in Scripta rar file.
I guess I found the problem, I put all the javascript under one folder called js.
ill try if it works.

noPCtoday
07-19-2007, 05:33 AM
hey thanks! it works now!! :cD

_Aerospace_Eng_
07-19-2007, 07:34 AM
It should have still worked if the js was in the folder. I think you may have had a different version of prototype.js.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum