Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Delay Interstitial Popup 5-10 seconds

  1. #1
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Delay Interstitial Popup 5-10 seconds

    1) Script Title: Interstitial Content Box

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...terstitial.htm

    3) Describe problem:

    I want to be able to delay the Interstital from loading, I guess on a timer, for about 5-10 seconds after page is loaded or reached.

    Very little on Google/forums/everywhere about this. Heck I just thought it was a lightbox advertisement and had a hard time finding out this was the correct definition. It's crazy because a ridiculous amount of sites use this.

    Don't even have it up on a Web site yet for an example. But I have it working on a test page normally, just want to delay the load.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    showdelay:5000,
    
    showcontainer:function(){
    if (this.interContainer.style.display=="none") return //if interstitial box has already closed, just exit (window.onresize event triggers function)
    var ie=document.all && !window.opera
    var dom=document.getElementById
    var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
    var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
    var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth-this.scrollbarwidth
    var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
    var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight
    var objwidth=this.interContainer.offsetWidth
    var objheight=this.interContainer.offsetHeight
    this.interVeil.style.width=docwidth+"px" //set up veil over page
    this.interVeil.style.height=docheightcomplete+"px" //set up veil over page
    this.interVeil.style.left=0 //Position veil over page
    this.interVeil.style.top=0 //Position veil over page
    this.interContainer.style.left=docwidth/2-objwidth/2+"px" //Position interstitial box
    var topposition=(docheight>objheight)? scroll_top+docheight/2-objheight/2+"px" : scroll_top+5+"px" //Position interstitial box
    this.interContainer.style.top=Math.floor(parseInt(topposition))+"px"
    if (this.autohidetimer && parseInt(this.autohidetimer)>0 && typeof this.timervar=="undefined")
    this.timervar=setTimeout("interstitialBox.closeit()", this.autohidetimer*1000)
    var oop=this;
    setTimeout(function(){
    oop.interVeil.style.visibility="visible" //Show veil over page
    oop.interContainer.style.visibility="visible" //Show interstitial box
     },oop.showdelay);
    },
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. #3
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    do i just insert that into the JS file?

    ps: thanks for the answers

  4. #4
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    replace the current 'showcontainer' function with the posted 'showcontainer' function and add the new property 'showdelay:5000,' to set the delay
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  5. #5
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://dejesusdriveways.com/test.php

    Would you know why is it now allowing javascript to be shown in the linked html or php? file http://dejesusdriveways.com/locater.html
    http://dejesusdriveways.com/locater.php

  6. #6
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    the script is not on the link you posted
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  7. #7
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ? it is to me, it takes a few seconds to load (check the locater files)

  8. #8
    Join Date
    Oct 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for sharing this!
    [url=http://www.soccerjerseyculture.com">football shirts supplier[/url]
    [url=http://www.soccerjerseyculture.com">football shirts wholesale[/url]

  9. #9
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    nice blatant spam -.-

    can I become an mod now?

  10. #10
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    PS VWPhillips: I have it set so the cookie only shows once per browser session, maybe that's why it didn't show up before for you?

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
  •