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 3 of 3

Thread: how do i ...

  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do i ...

    i am making a website and i want pieces of information on the page to appear at different times. for example, when a user clicks on a page, 3 pieces of information appear one after the other and finally they all remain on the page ... does anyone know how to do this

    hope that makes sense thanks,

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,992
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    I expect that someone does indeed know how to do this.


    <script type = "text/javascript">

    setTimeout ("doit2()",2000); // two seconds delay

    function doit2() {
    setTimeout ("doit3()",2000);
    document.getElementById('fred2').innerHTML='Second line of message';
    }

    function doit3() {
    setTimeout ("doit4()",2000);
    document.getElementById('fred3').innerHTML='Third line of message';
    }

    function doit4() {
    document.getElementById('fred4').innerHTML='Fourth line of message';
    }

    </script>

    <span id=fred1 >Initial Value if anything</span><br>
    <span id=fred2 ></span><br>
    <span id=fred3 ></span><br>
    <span id=fred4 ></span><br>

    Do please read the posting guidelines at http://www.codingforums.com/postguide.htm regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose.

    Also cross-posted, contrary to the rules:-

    1.2) Do not crosspost- CodingForums.com is divided into various categories. When initiating a thread, always locate the most appropriate category, and post your question only ONCE, in that category. Do not post the same question in multiple categories.


    It is your responsibility to die() if necessary….. - PHP Manual
    Last edited by Philip M; 12-22-2007 at 12:40 PM.

  • #3
    New Coder
    Join Date
    Dec 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry im new to this, i posted it twice because someone told me its most likely to be javascript which i didnt realise at the time, so i moved it somewhere where i thought it would be more relevant

    thanks for your help, i will try it out


  •  

    Posting Permissions

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