J_A_V_A_S_C_R_I_P_T Gurus - Help...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheJimmy
    ICQ- five seven 0 2 5 5 0
    • Jan 2001
    • 10747

    #1

    J_A_V_A_S_C_R_I_P_T Gurus - Help...

    anyone know how to display a form/button after a specified time delay?


    like I want an html page to have some text, bla bla bla, then after about 20seconds on that same page I want a form/button to show up...



    thanks in advance...
    Investor with 5m - 15m USD to invest. Do you have a site or network of sites earning 50k - 200k a month income? Email your contact and preliminary data to: domain.cashventures (at) gmail.com....Please...no tire kickers...serious offers and inquiries only.
  • enjetek
    Registered User
    • Jun 2004
    • 26

    #2
    from what i think you want you might want to use another language such as php/asp to rewrite/add the html of the page after the delay time. with hahahahahahahahahaha you can use it to rewrite html after the time but it can be easier to just forward it to another page. with php/asp you can just refresh the page with the new button(s) added without having to worry about other files because it can all be written in 1 file. i may be wrong but i hope it helps.

    -myke

    Comment

    • rickholio
      Confirmed User
      • Jan 2004
      • 1914

      #3
      Originally posted by TheJimmy
      anyone know how to display a form/button after a specified time delay?


      like I want an html page to have some text, bla bla bla, then after about 20seconds on that same page I want a form/button to show up...
      Two relatively painless ways of handling this.

      Method 1 - Put your form inside a DIV that's visibility: hidden. Start your timeout and have your callback un-hide the DIV.

      Method 2 - Put an empty DIV where you want your form to appear. When your timeout runs, put the entire content of your form into the DIV using innerHTML.

      I've used both methods successfully, although the second one can be a bit of a PITA due to size limitations of static strings in js... I tend to use that more for dynamic regeneration of display elements.

      HTH. HAND.
      ~

      Comment

      Working...