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
    New Coder
    Join Date
    Jul 2006
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Help With Script

    I have the following script:

    <html>
    <head>
    <title></title>
    <style type="text/css">
    .body2 {
    width:700px;
    height:500px;
    background-color:green;
    }
    .details {
    width:500px;
    height:200px;
    left:100px;
    top:100px;
    background-color:blue;
    display:none;
    position:absolute;
    }
    .display {
    display:inline;
    }
    </style>
    <script type="text/javascript" src="SpryEffects.js"></script>
    <script type="text/javascript">
    function fadeOut(){
    var effect = new Spry.Effect.Opacity("targetID", 1, 0.2, {duration: 300, toggle: false, finish: displayDetails});
    effect.start();
    }

    function fadeIn(){
    var effect = new Spry.Effect.Opacity("targetID", 0.2, 1, {duration: 300, toggle: false});
    effect.start();
    }

    function displayDetails() {
    var effect = new Spry.Effect.Grow("targetID2", {duration: 300, toggle: false, from: "0%", to: "100%"});
    effect.start();
    }

    function closeDetails() {
    var effect = new Spry.Effect.Grow("targetID2", {duration: 300, toggle: false, from: "100%", to: "0%", finish: fadeIn});
    effect.start();
    }
    </script>
    </head>
    <body>
    <div id="targetID">
    <a href="#" onclick="fadeOut();"><h3>Click Me</h3></a>
    <div class="body2"></div>
    </div>
    <div class="details" id="targetID2">
    <a href="#" onclick="closeDetails();">close</a><br />
    <p>
    This is a test, this is only a test. This is a test, this is only a test. This is a test, this is only a test. This is a test, this is only a test.
    This is a test, this is only a test. This is a test, this is only a test. This is a test, this is only a test. This is a test, this is only a test.
    This is a test, this is only a test. This is a test, this is only a test. This is a test, this is only a test. This is a test, this is only a test.
    </p>
    </div>
    </body>
    </html>

    When I run it the first time, it works great. When I go back to run it again, it gives me an error saying "Invalid argument". Not sure what this means, but I would appreciate any help I can get.

    I attached the Spry JS file also, I had to change the file to a .txt so that I can upload it. Don't forget to change the file to .js so that you can run the script.

    Thanks,

    7079

  • #2
    New Coder
    Join Date
    Jul 2006
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Not sure what happened to the attachment, I'm trying to do it again.

  • #3
    New Coder
    Join Date
    Jul 2006
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts
    http://labs.adobe.com/technologies/spry/home.html is the link for the spry home page. If you want to run the script you should download at least the SpryEffects.js file so that you can see what the issue is.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    http://www.codingforums.com/showthread.php?t=2090

    Especially paragarphs 1 and 3.

  • #5
    New Coder
    Join Date
    Jul 2006
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I reposted my request for help under a more specific title, here it is:

    Spry Effects Error, Invalid Argument


  •  

    Posting Permissions

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