www.webdeveloper.com
Results 1 to 4 of 4

Thread: Animated Image

  1. #1
    Join Date
    Sep 2006
    Posts
    192

    Animated Image

    When the user does the search and waits for the result, an animated image such as an hourglass will appear on the middle of the screen so that the user will know the process is still going on.

    I went to this site:http://loadinggif.com/ and downloaded #3, and saved it to my server's WebContent/images directory. I gave it a name: dial.gif.

    Next I tried to used it in a popup <div> (z-index based).

    The original codes:

    var processing = '<div class="process"><br>'
    content += '<embed src="/flash/loading.swf" quality="autolow" '

    if(modal.browserWindow.os != 'mac') {
    content += ' wmode="transparent"';
    } else {
    content += ' wmode="window"';
    }

    content += ' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="60" height="60"></embed>' + '</div>';


    Now, I tried to use the download image, dial.gif to replace the swf file, something like:

    content += '<div ><img src="/imgs/dial.gif" /></div';


    How can I do it?
    Last edited by scottjsn; 10-25-2012 at 11:52 AM.

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,128
    Where is "content" first defined? Surely there's more code than what you have there.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    Sep 2006
    Posts
    192
    Sorry for the mistake.

    It should be:

    var content = '<div class="process"><br>'
    content += '<embed src="/flash/loading.swf" quality="autolow" '

    if(modal.browserWindow.os != 'mac') {
    content += ' wmode="transparent"';
    } else {
    content += ' wmode="window"';
    }

    content += ' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="60" height="60"></embed>' + '</div>';



    Thanks

  4. #4
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,128
    That makes more sense

    Try removing all that and simply putting:

    Code:
    var content = '<div class="process"><img src="/imgs/dial.gif" /></div>';
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

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