Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    39
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Scriptaculous easy problem.

    I wrote a simple code to test scriptaculous, no matter what I change, it still wont run. Even this simplest one...



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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I'm not sure what you are trying but this works fine for me.
    Code:
    <!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
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Registered User
    Join Date
    Jun 2007
    Posts
    39
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Registered User
    Join Date
    Jun 2007
    Posts
    39
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hey thanks! it works now!! :cD

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It should have still worked if the js was in the folder. I think you may have had a different version of prototype.js.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •