Results 1 to 8 of 8

Thread: DHMTL Window Onclick

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

    Question DHMTL Window Onclick

    1) Script Title: DHTML Window widget (v1.03)

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

    3) Describe problem: How is it possible to hide the Div when clicking outside of the Div; e.g. document onclick style.display = 'none'. Using 'divwin.hide' works flawlessly when clicking inside of the Div.

    Thanks in advance for your assistance.
    Last edited by woodier; 07-08-2007 at 08:52 PM. Reason: incomplete url

  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

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.

    (The one you gave is broken)

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    - John
    ________________________

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

  3. #3
    Join Date
    Nov 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question DHMTL Window Onclick

    jscheuer1,

    The incomplete URL was copied from another posting about the DHMTL Window.
    My website is in local development, hence there isn't a link to a web page.

    woodier

  4. #4
    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

    Quote Originally Posted by woodier View Post
    1) Script Title: DHTML Window widget (v1.03)

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

    3) Describe problem: How is it possible to hide the Div when clicking outside of the Div; e.g. document onclick style.display = 'none'. Using 'divwin.hide' works flawlessly when clicking inside of the Div.
    Thanks for fixing the link. OK, what division are you talking about? I can put a (for example from the demo):

    Code:
    <a href="#" onclick="inlinewin.hide(); return false">Hide Window 2</a>
    anywhere on the page that opened it and it will close it.

    If you are trying to close an iframe from within the iframe or any DHTML window from within an(other) iframe (again from the demo):

    Code:
    <a href="#" onclick="parent.googlewin.hide(); return false">Hide Window 1</a>
    If you are still having problems, a link to an example of the problem would suffice to diagnose further.
    - John
    ________________________

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

  5. #5
    Join Date
    Nov 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question DHMTL Window Onclick

    jscheuer1,

    The wording of my request for assistance does not include creating a link to close an Iframe, nor a Div. If you look at the source for Window 4, reference the Script URL, you will find the Div. Clicking outside of the DHMTL Window doesn't hide the Div.

    woodier

  6. #6
    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

    This works (as I indicated earlier with another demo DHTML window example) from anywhere on the page:

    Code:
    <a href="#" onclick="divwin.hide(); return false">Hide Window 4</a>
    - John
    ________________________

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

  7. #7
    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'm trying to understand what you are driving at, do you want to close window 4 if the user clicks anywhere on the page, even if it isn't a link?
    - John
    ________________________

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

  8. #8
    Join Date
    Nov 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHMTL Window Onclick

    Try adding "t.handle.onmouseout=function() {dhtmlwindow.close(this)}" to dhmtlwindow.js. This will give you some idea of what I'm trying to accomplish.

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
  •