www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Fade Script

  1. #1
    Join Date
    Jul 2010
    Posts
    71

    resolved [RESOLVED] Fade Script

    Code:
    function picone(){
    picone = new Object();
    picone.style.opacity = 1/10;
    picone.style.filter = 'alpha(opacity=' + 5*10 + ')';
    }
    Im having a problem getting this code to work, it keeps saying picone is not defined buti put NAME="picone" in an img tag, did i miss something?

  2. #2
    Join Date
    Mar 2010
    Location
    Singapore
    Posts
    367
    Quote Originally Posted by ZZY View Post
    Code:
    function picone(){
    picone = new Object();
    picone.style.opacity = 1/10;
    picone.style.filter = 'alpha(opacity=' + 5*10 + ')';
    }
    Im having a problem getting this code to work, it keeps saying picone is not defined buti put NAME="picone" in an img tag, did i miss something?
    Code:
    <img src=<...> name="picone">
    A simple way is change above name to id="picone". And then to reference it, just use

    Code:
    function picone(){
    picone = document.getElementById("picone");
    picone.style.opacity = 1/10;
    picone.style.filter = 'alpha(opacity=' + 5*10 + ')';

  3. #3
    Join Date
    Jul 2010
    Posts
    71
    thansk, i tried that earlier with no sucess but i guess i did something wrong, thanks

    ZZY

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles