Results 1 to 3 of 3

Thread: DHTML popupbox

  1. #1
    Join Date
    Jan 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML popupbox

    1) Script Title: DHTML announcement box (popupbox)

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamicindex11/abox.htm

    3) Describe problem:
    No problem with the actual script. I have been trying to modify it so it does not popup immediately on entering the page but delaying it for a few seconds. Is this possible? I have tried all i know. For example <body onload setimeout etc etc. Any advice would be appreicated deeply.

    Regards
    Kase

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Code:
    <body onload="javascript:setTimeout('function', X*1000)">
    where "function" is the initialization functin and "X" is the number of seconds you want it to delay

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    The javascript keyword can't be used there, that's only first anchor's "href" property. That undefined X won't work either:
    Code:
    <body onload="setTimeout(function() {element.style.display='block'}, 1000)">
    Set the "element"'s display to an initial, display:none, then do as above.

    1000 = 1 seconds / 1000 milliseconds.
    - Mike

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
  •