Results 1 to 2 of 2

Thread: Drop-in Content Box Top not working

  1. #1
    Join Date
    Sep 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Drop-in Content Box Top not working

    1) Script Title: Dropinbox - Drop-in Content Box

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

    3) Describe problem:
    The script does not respect the TOP attribute of the DIV that specifies the drop-in box behavior - the Width, Left and other attributes work fine. Changing or removing the TOP attribute has no impact on the placement of the box. I have tested the script in a clean HTML pages using IE8 and the latest version of Firefox. I am assuming that the box should appear at the top of the page and slide down the page and stop at the position that is set by the TOP attriubute.

    Any help would be appreciated.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The top value is programmatically set in the script, so in order to alter it, you need to do so in the script. I've highlighted the two values in red that need to be changed, in the below case, to 300:

    Code:
    function initbox(){
    if (!dom&&!ie&&!ns4)
    return
    crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    crossobj.top=scroll_top-300+calunits
    crossobj.visibility=(dom||ie)? "visible" : "show"
    dropstart=setInterval("dropin()",50)
    }
    
    function dropin(){
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    if (parseInt(crossobj.top)<300+scroll_top)
    crossobj.top=parseInt(crossobj.top)+40+calunits
    else{
    clearInterval(dropstart)
    bouncestart=setInterval("bouncein()",50)
    }
    }
    DD Admin

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
  •