document.onclick

P

Peter

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top