SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Oct 2010
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    interval is not functioning properly for vad id

    why my vad show quickly even m settting time on that to display

    here is my code



    <div id="vad">
    <div id="adcode">

    CODE SHOW HERE
    </div>
    <div id="cbut" onClick="document.getElementById('vad').style.display='none'">CLOSE</div>

    </div>

    <script>

    k=setInterval('document.getElementById("vad").style.visibility="visible"',20000);

    v=setInterval('document.getElementById("cbut").style.visibility="visible"',30000)

    </script></div>

  2. #2
    SitePoint Addict bronze trophy AllanP's Avatar
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    298
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It is probably because you have the wrong syntax for the timeout.
    ('document.getElementById("vad").style.visibility="visible"',2000 0);
    should be ,2000). In the next line ,300 00) should be ,3000)


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
  •