document.onclick

Discussion in 'Javascript' started by Peter, May 4, 2005.

  1. Peter

    Peter Guest

    I have created a buttonbar with server custom dropdown lists. When a
    list has been opened it has to be closed by a click anywhere in the
    browser. I have a javscript function that closes this list added to the
    document.onclick like this document.onclick = Hide; This works no
    problem here.

    Now somewhere else on the page is a help viewer that when clicked opens
    a div with additional help info. I want this div to close when I click
    somewhere on the document. When I add document.onclick=HideDiv my menu
    does not get closed anymore because I now use document.onclick for the
    div.

    What am I doing wrong here?
    Peter, May 4, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RWFybCBUZWlncm9i?=

    document.body.onclick not working in script

    =?Utf-8?B?RWFybCBUZWlncm9i?=, Aug 18, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    32,135
    =?Utf-8?B?RWFybCBUZWlncm9i?=
    Aug 23, 2004
  2. KS
    Replies:
    1
    Views:
    831
  3. bob
    Replies:
    3
    Views:
    178
  4. Replies:
    2
    Views:
    240
  5. Replies:
    4
    Views:
    165
Loading...

Share This Page