in

WD Community

Share your workout experiences.

Bugs / Fixes / Small Enhancements

Last post 04-15-2007 10:30 PM by Mcbeev. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-11-2007 9:17 AM

    • Cory
    • Top 25 Contributor
    • Joined on 01-25-2007
    • Posts 4

    Bugs / Fixes / Small Enhancements

    I noticed that when I first load the site, the top navigation images aren't loading until all the avatar images are loaded. Since some of those avatars are stored remotely, my navigation is not there for a few seconds. I would suggest pre-loading the navigation images, or get them to load first.
  • 04-11-2007 9:31 AM In reply to

    Re: Bugs / Fixes / Small Enhancements

    yep your right, why dont you write the JS for me ? Big Smile
  • 04-11-2007 10:01 AM In reply to

    • Cory
    • Top 25 Contributor
    • Joined on 01-25-2007
    • Posts 4

    Re: Bugs / Fixes / Small Enhancements

    Here's what I'm using for the MBS site. I'm using it for rollover images, I think it will work in this case though. I'll be happy to look around more if this doesn't work how you need it to.

    Put in the <HEAD>
    ----------------------------------------------------------
    <script type=""text/javascript"">
    <!--
       var preloadFlag = false;
       function preloadImages() {
           if (document.images) {
               // Navigation Buttons
               mainNav_over        = newImage('images/mainNav_over.gif');
               mainNav_down        = newImage('images/mainNav_down.gif');
               preloadFlag         = true;
           }
       }
    -->
    </script>

    Put in the <BODY>
    ----------------------------------------------------------
    <body onLoad="BLOCKED SCRIPTpreloadImages();">

    The "BLOCKED SCRIPT" is java_script_: without the "_"

  • 04-13-2007 9:32 AM In reply to

    Re: Bugs / Fixes / Small Enhancements

    How about a filter or section in "Top Users" for the biking crowd?
  • 04-13-2007 10:51 AM In reply to

    Re: Bugs / Fixes / Small Enhancements

    Yep I do want to add that, soon.
  • 04-15-2007 10:30 PM In reply to

    Re: Bugs / Fixes / Small Enhancements

    Cory:

    Here's what I'm using for the MBS site. I'm using it for rollover images, I think it will work in this case though. I'll be happy to look around more if this doesn't work how you need it to.

    Put in the <HEAD>
    ----------------------------------------------------------
    <script type=""text/javascript"">
    <!--
       var preloadFlag = false;
       function preloadImages() {
           if (document.images) {
               // Navigation Buttons
               mainNav_over        = newImage('images/mainNav_over.gif');
               mainNav_down        = newImage('images/mainNav_down.gif');
               preloadFlag         = true;
           }
       }
    -->
    </script>

    Put in the <BODY>
    ----------------------------------------------------------
    <body onLoad="BLOCKED SCRIPTpreloadImages();">

    The "BLOCKED SCRIPT" is java_script_: without the "_"

     Cory

    Based on this research:

    "JavaScript experts advise not to use HTML-DOM properties, such as src. Instead, we should create images with the ‘true’ DOM (a.k.a. DOM Core), and set the src attribute with the setAttribute method."

    I'm using this javascript

    //image pre-loader

    var preloaded = new Array();

    function preload_images()

    {

    for (var i = 0; i < arguments.length; i++)

    {

    preloaded[ i] = document.createElement('img');

    preloaded[ i].setAttribute('src',arguments[ i]);

    }

    }

    preload_images(

    'App_Themes/header.gif', 'App_Themes/horizontal.gif',

    'App_Themes/bg.gif'

    );

Page 1 of 1 (6 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems