By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,622 Members | 1,103 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,622 IT Pros & Developers. It's quick & easy.

Toggling display problems

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.