Effect is undefined

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gskoli
    New Member
    • May 2010
    • 23

    Effect is undefined

    Dear all,
    Please help me out, i am using scriptaculous in my script. But it is giving error to me that Effect is not defined .
    Code:
     <head>
    <script type="text/javascript" src="/js/prototype.js"></script>
            <script type="text/javascript" src="/js/scriptaculous.js?load=effects"></script>
            <script type="text/javascript" src="/js/effects.js"></script>
        function only_refresh(){
         // Some code .
         var fade_in = setInterval("fade_in()",5000);
         }
    function fade_in(){
                            new Effect.Appear("div_id", {duration:2, from:0, to:1.2});
                            //fadeout.delay(1000);
                    }
     </head>
    Please help
    Thanks in advance.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    The JavaScript functions need to be within script tags

    Comment

    • gskoli
      New Member
      • May 2010
      • 23

      #3
      Thanks to reply buddy ...
      I have used tag in my code forgot to give here ...
      Anyways thanks for reply ...
      It is resolved now ...

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        How did you solve it? Courteous to mention the solution.

        Comment

        • gskoli
          New Member
          • May 2010
          • 23

          #5
          Originally posted by acoder
          How did you solve it? Courteous to mention the solution.
          ya actually it was silly mistake ..
          i have included one file(javascript ) above prototype.js and forgot to close script tag.
          Thats why it was not able to find prototype.js file.

          Comment

          Working...