Advanced Search

Results 1 to 4 of 4

Thread: Page loader script problem; not work in IE

  1. #1
    Join Date
    Dec 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Page loader script problem; not work in IE

    Hello i am very new to this forum ,

    I want to implement page loader functionality means while loading page first it load loader image and in background it can load total page and when page load properly the loader image is to invisible. and i am using the following code

    <script>

    window.onload=function()
    {
    document.getElementById('loading').style.visibility="hidden";
    }
    }
    </script>




    <body >
    <div align="center" id="loading" style="position:absolute; height:100%; width:100%; text-align:center; top:0px; background-color:gray; opacity:0.6; filter:alpha(opacity=50); " >

    <div style="top:300px; padding-top:300px; ">
    <img src="<?=WEB_ROOT;?>/images/loading1.gif" align="center" border="0" style="background-color:#FFFFFF; ">
    <br/>
    <br/>
    <p style="font-size:20px ">
    <strong style="color:#FFFFFF ">Please Wait......Loading Results</strong>
    </p>
    </div>
    </div>


    </body>



    This code is properly work in Firefox but not work in Internet Explorer.
    Why???
    If any changes that i have to make in code please send me....
    Please any one can help me???????
    Last edited by rushiags; 12-31-2008 at 01:11 PM.

  2. #2
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Instead of 'script', try this tag:

    Code:
    <script type="text/javascript">
    // loader here
    </script>
    That may work.

    -magicyte

  3. #3
    Join Date
    Jan 2008
    Posts
    4,158
    Thanks
    28
    Thanked 623 Times in 619 Posts
    Blog Entries
    1

    Default

    Code:
    window.onload=function()
    {
    document.getElementById('loading').style.visibility="hidden";
    }
    }
    Remove the red part.
    Jeremy | jfein.net

  4. #4
    Join Date
    May 2006
    Location
    Alaska
    Posts
    163
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Default

    Err, it's not wrong, but I noticed that in this:
    Quote Originally Posted by rushiags View Post
    <div align="center" id="loading" style="position:absolute; height:100%; width:100%; text-align:center; top:0px; background-color:gray; opacity:0.6; filter:alpha(opacity=50); " >
    The transparency values for IE and FF aren't equivalent, so in IE they'll be slightly less visible. I doubt that's what you really want.
    Also, I think you're supposed to use [code] tags for your code, no?

    Stephen

Bookmarks

Posting Permissions

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