add timer to show/hide layer script

if i wanted to place a timer to show or hide a layer -- for example: i'm trying to get a timer set to my Vstatus variable to start at "visible" and after 10 seconds ends at "hide" what do you suggest?



Vstatus='visible';

function loadLayer ()
{

newLayer = document.createElement ('div');
with (newLayer)
{
innerHTML = ""
style.visibility = Vstatus;
}
document.body.appendChild (newLayer)
newLayer = new Layer;
newLayer.src = "index2.htm";

}
window.loadLayer();





Comments

  • Hi there. Your example isn't very simple, so I'll use an another example:



    function HideDiv() { MyDiv.style.visibility='hidden' }


    TESTE!!




    That's it. I hope this helps.

    -- Secret_Doom --

    secret_doom@hotmail.com
    www.batch.hpg.com.br




    : if i wanted to place a timer to show or hide a layer -- for example: i'm trying to get a timer set to my Vstatus variable to start at "visible" and after 10 seconds ends at "hide" what do you suggest?
    :
    :
    :
    : Vstatus='visible';
    :
    : function loadLayer ()
    : {
    :
    : newLayer = document.createElement ('div');
    : with (newLayer)
    : {
    : innerHTML = ""
    : style.visibility = Vstatus;
    : }
    : document.body.appendChild (newLayer)
    : newLayer = new Layer;
    : newLayer.src = "index2.htm";
    :
    : }
    : window.loadLayer();
    :
    :
    :
    :
    :
    :

  • great thanks! i posted this a little while back ago and never heard anything so it's been on the back burner since. i'll get to it asap. tx again!

    : Hi there. Your example isn't very simple, so I'll use an another example:
    :
    :
    :
    : function HideDiv() { MyDiv.style.visibility='hidden' }
    :
    :
    :
    TESTE!!

    :
    :
    :
    : That's it. I hope this helps.
    :
    : -- Secret_Doom --
    :
    : secret_doom@hotmail.com
    : www.batch.hpg.com.br
    :
    :
    :
    :
    : : if i wanted to place a timer to show or hide a layer -- for example: i'm trying to get a timer set to my Vstatus variable to start at "visible" and after 10 seconds ends at "hide" what do you suggest?
    : :
    : :
    : :
    : : Vstatus='visible';
    : :
    : : function loadLayer ()
    : : {
    : :
    : : newLayer = document.createElement ('div');
    : : with (newLayer)
    : : {
    : : innerHTML = ""
    : : style.visibility = Vstatus;
    : : }
    : : document.body.appendChild (newLayer)
    : : newLayer = new Layer;
    : : newLayer.src = "index2.htm";
    : :
    : : }
    : : window.loadLayer();
    : :
    : :
    : :
    : :
    : :
    : :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories