Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member medlington's Avatar
    Join Date
    Nov 2005
    Location
    Sheffield, UK
    Posts
    377
    Member #
    11968
    Liked
    4 times
    Hi,

    Im having trouble with a dropdown menu and a javascript preloader.

    The site was working fine until I added this preloader to it so that the entire page loaded at the same time. The menus at the bottom used to drop up as you can see on this page:

    http://www.arjanbaagh.com/index.php

    but now I've added the preloader the menus drop down?

    http://www.arjanbaagh.com/aboutus-concept.php

    heres the script that I've added as the preloader:

    in the head:

    Code:
    <script language="javascript" type="text/javascript">
    function showpage() {
    document.getElementById('loader').style.display = "none";
    document.getElementById('main').style.display = "block";
    }
    </script>
    and start of body:

    Code:
    <body onload="showpage();">
    <div style="height:100%; width:100%; display:block;" id="loader">
    </div>
    <div style="height:100%; width:100%; display:none;" id="main">
    and then I just put a closing div at the bottom of the body so all of the content is inside the Div that should be preloaded.

    Im guessing that there is some conflict in the javascript but just cant figure out what it is?

    Has anyone got any ideas or different ways I can preload the images?

    Thanks

  2.  

  3. #2
    Junior Member
    Join Date
    Apr 2012
    Location
    Hayward, CA
    Posts
    3
    Member #
    31505
    It seems you have resolved the issue because the sub-menus work the same way in both pages now.

  4. #3
    Senior Member medlington's Avatar
    Join Date
    Nov 2005
    Location
    Sheffield, UK
    Posts
    377
    Member #
    11968
    Liked
    4 times
    Thanks for the reply, yes I fixed it but Im not too sure what the problem was.

    I think it was something to do with the relative positioning of the dropup menus being affected by the new 'loader' div s positioning.

    When I set the preloader div to be absolute positioning with a different Z-Index it seemed to fix it


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com