Results 1 to 2 of 2

Thread: DHTML Window drag bug

  1. #1
    Join Date
    Jun 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Window drag bug

    I'm adapting the DHTML Window, and I've been trying to work around this problem for a few days now. If you drag the window off the screen to the left, you simply can't see the off-screen part, as expected. However, if you drag it to the right or bottom, it extends the page (exposing a few bugs in the process). Is there any way to force it to function on the right and bottom as it does on the left (without removing the scroll bars entirely)?

    Thanks,
    Jason

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I may be able to figure that out. For now though, here is a solution that lets you drag it off the screen in any direction and still be able to retrieve it:

    Change the beginning lines of 'function initializedrag' to look like this:
    Code:
    function initializedrag(e){
    offsetx=ie5? event.clientX+iecompattest().scrollLeft : e.clientX+pageXOffset
    offsety=ie5? event.clientY+iecompattest().scrollTop : e.clientY+pageYOffset
    This seems to introduce a new bug in IE where if you move the box below the bottom, release it and then try to reacquire it, it jumps down about 3px. To avoid this, change the two instances in the script of:
    Code:
    document.getElementById("dwindowcontent").style.display=
    to:
    Code:
    document.getElementById("cframe").style.display=
    This may reintroduce a bug that 'document.getElementById("dwindowcontent").style.display=' was meant to eliminate but, I couldn't find one.

    Added Later:

    I was tinkering around with this script a bit more and came up with this beefed up demo:

    http://home.comcast.net/~jscheuer1/s...incentered.htm

    If you are interested.
    Last edited by jscheuer1; 06-28-2005 at 08:18 AM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •