Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    Mumbai,India
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display a layer after delay

    Dear All

    I want to make a layer visible after say 15 seconds when window opens,
    and will remain visible for ever.

    How can I do it ...


    with regards
    Vikas Athavale

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Something like the following



    <script>

    setTimeout("document.getElementById(\"mylayer\").style.visibility=\"visible\"",5000)

    </script>

    <div id="mylayer" style="visibility:hidden">Hello world</div>




    Is this layer in the new window?
    Last edited by Mr J; 06-27-2004 at 04:55 PM.

  • #3
    New Coder
    Join Date
    Oct 2002
    Location
    Mumbai,India
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thelayer is NOT in new window however ..

    Dear Mr J

    Thanks a lot for the prompt reply

    The layer is NOT in new window however ..

    What happens in case the layer is in new window ?


    Can I define this as a function...like this

    <script language=j"avascript ">
    function showlayer()
    {
    setTimeout("document.getElementById(\"mylayer\").style.visibility=\"visible\"",5000)
    }
    </script>
    I want to call this function when window is loaded

    How do I call it when window opens..

    Please help ...

    With regards
    Thanking you in advance
    Vikas AThavale

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Put showlayer() in the opening body tag like so


    <BODY onload="showlayer()">

  • #5
    New Coder
    Join Date
    Oct 2002
    Location
    Mumbai,India
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks that was speedy & accurate reply

    Thanks
    Thanks

    Thanks that was speedy & accurate reply

    Thanks


  •  

    Posting Permissions

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