Results 1 to 12 of 12

Thread: Time Delay

  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Time Delay

    Is it possible to have text that does not display until a specified time interval after a page has been opened?
    The idea is that if someone doesn't figure out what to do, some helpful text appears.
    Thanks

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time Delay

    A solution may be to have a small(er) window open up after a predermined period - similar in size to the '1-Click Tagpanel'. The user can then decide whether to keep it open as a guide or close it.
    See <A target="_blank" HREF=http://javascript.internet.com/navigation/popup-page.html>this example</A> at the JavaScript source, which includes the code for opening the new window after a set period of time.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Time Delay

    I think you could create an empty textarea and then, after a certain amount of time elapsed, dump some text into it. To have text appear on the page without a form element, you would need a way to reference it. My JavaScript/HTML isn't that strong, but maybe someone else knows how you could do that. Let's assume you have some kind of handle for a clump of text (perhaps in <DIV> tags). If that text were initially in the same color as the background, you later might be able to change it to a contrasting color.

    I'd be interested to see what you come up with.

  4. #4
    nicolferguson
    Guest

    Re: Time Delay

    How about just making two copies of the same page, one without the text, the other with it, and inserting a JavaScript onLoad timed redirect in the first page to execute the second page a fixed time after the first one loads.

    Not very elegant, but it is a solution!

    You'll get a timed redirect script at the <A target="_blank" HREF=http://javascript.internet.com/navigation/timed-redirect.html> JavaScript Source </A>.

    Cheers.

  5. #5
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Time Delay

    We got around the problem some other way but I'll have a look at the link for future reference. Thanks.

  6. #6
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles, California, USA
    Posts
    1,734
    Thanks
    0
    Thanked 3 Times in 1 Post

    Re: Time Delay

    How did you get around it?
    <IMG SRC=http://www.wopr.com/w3tuserpics/Eileen_sig.gif>

  7. #7
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time Delay

    Is Javascript a possibility for you?

    In IE, I'd do something like this. It may be similar in Netscape, but I'm not familiar with what you might have to do:
    <pre><html>
    <Head>
    <Title> testing</title>
    <script>
    setTimeout('show()', 2000); // 2 seconds
    function show() {
    Reveal.style.display = 'block';
    }
    </script>
    </head>
    <body>
    Some HTML


    <span id="Reveal" style="display:none">
    Hidden text
    </span>
    </body>
    </html></pre>

    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  8. #8
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Time Delay

    I think what happened was that because of pressure to deliver (bet you haven't heard that before!), the decision was to abandon the additional text automatically popping up. Instead I think we just provided a popup with the additional information for those needing more help.
    Sorry to disappoint.

  9. #9
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Time Delay

    As you will see from my concurrent reply to Eileen's posting, the need for this has passed. That is not to say it will not recur so thanks for this. It is something a colleague may be able to help me with.

  10. #10
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Time Delay

    Gerry
    I just tried the script and it worked fine.
    Two questions.
    1] Removing // 2 seconds has no effect. Is that just a comment so that the time delay is clear?
    2] Changing 2000 does affect the delay. What is the unit here?
    Thanks for this script. I am sure it will be used.

  11. #11
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time Delay

    The ' // ' is a comment marker - i.e. everything after it should be ignored by the script.
    The time unit wil be milliseconds, thus 2000 = 2 seconds

  12. #12
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time Delay

    Peter,

    Leif's right in his answers.

    The script is elemantary. And, as stated, it only works in IE to my knowledge.

    Also, the code shown "pushes down" anyhing underneath- so it moves the rest of the page. There's ways of doing that more nicely as well- I was just trying to show the concept.

    Geoff
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

Posting Permissions

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