469,303 Members | 1,900 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,303 developers. It's quick & easy.

Toggling display problems

Hi all,

I have a page in which I display a menu which is a table within a div
element. Each cell in the table is a menu item with an "onclick" event
handler assigned.

I want to make it so that whenever the user clicks outside of the menu, the
menu is hidden. The only way I can see of doing this is using the
"ondeactivate" event for the table/div, but whenever I handle this event it
swallows the "onclick" event for the menu items, rendering the menu useless.

Is there an easier way of doing this? Any help would be much appreciated.

Cheers,

Jamie
Jul 20 '05 #1
6 1657
On Thu, 29 Jan 2004 11:43:48 +1300, Jamie <ja***@nospam.com> wrote:
Hi all,

I have a page in which I display a menu which is a table within a div
element. Each cell in the table is a menu item with an "onclick" event
handler assigned.

I want to make it so that whenever the user clicks outside of the menu,
the
menu is hidden. The only way I can see of doing this is using the
"ondeactivate" event for the table/div, but whenever I handle this event
it
swallows the "onclick" event for the menu items, rendering the menu
useless.

Is there an easier way of doing this? Any help would be much appreciated.

Cheers,

Jamie

How do you propose the visitor knows the menu is there in the first place?
If the menu disappears, will they be able to get it back? Sounds to me at
this point it's only going to drive your visitors up a tree...
Jul 20 '05 #2
"Neal" <ne*****@spamrcn.com> wrote in message
news:op**************@news.rcn.com...
On Thu, 29 Jan 2004 11:43:48 +1300, Jamie <ja***@nospam.com> wrote:
Hi all,

I have a page in which I display a menu which is a table within a div
element. Each cell in the table is a menu item with an "onclick" event
handler assigned.

I want to make it so that whenever the user clicks outside of the menu,
the
menu is hidden. The only way I can see of doing this is using the
"ondeactivate" event for the table/div, but whenever I handle this event
it
swallows the "onclick" event for the menu items, rendering the menu
useless.

Is there an easier way of doing this? Any help would be much appreciated.
Cheers,

Jamie

How do you propose the visitor knows the menu is there in the first place?
If the menu disappears, will they be able to get it back? Sounds to me at
this point it's only going to drive your visitors up a tree...


It's a context menu that displays when the user right-clicks on an icon. We
have limited real estate, so it was the best option...

Cheers,

Jamie
Jul 20 '05 #3
in post: <news:bv**********@lust.ihug.co.nz>
"Jamie" <ja***@nospam.com> said:
I have a page in which I display a menu which is a table within a div
element. Each cell in the table is a menu item with an "onclick" event
handler assigned.
I want to make it so that whenever the user clicks outside of the menu, the
menu is hidden.


doesn't sound very user friendly. KISS
--
brucie - i usenet nude
Jul 20 '05 #4
brucie wrote:
in post: <news:bv**********@lust.ihug.co.nz>
"Jamie" <ja***@nospam.com> said:

I have a page in which I display a menu which is a table within a div
element. Each cell in the table is a menu item with an "onclick" event
handler assigned.
I want to make it so that whenever the user clicks outside of the menu, the
menu is hidden.

doesn't sound very user friendly. KISS


<SMOOCH>
Matthias

Jul 20 '05 #5
in post: <news:bv************@ID-16734.news.uni-berlin.de>
Matthias Gutfeldt <sa************@gmx.net> said:
doesn't sound very user friendly. KISS
<SMOOCH>


@)>-`--,--'-- x 12

--
brucie - i usenet nude
Jul 20 '05 #6
On Thu, 29 Jan 2004 18:30:06 +1000, brucie <sh**@bruciesusenetshit.info>
declared in comp.infosystems.www.authoring.html:
in post: <news:bv************@ID-16734.news.uni-berlin.de>
Matthias Gutfeldt <sa************@gmx.net> said:
KISS

<SMOOCH>


@)>-`--,--'-- x 12


This is a *public* newsgroup, guys. Take it elsewhere, please. :-)

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Dr John Stockton | last post: by
13 posts views Thread by Gunnar | last post: by
1 post views Thread by siaj | last post: by
1 post views Thread by Jesse Aufiero | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.