473,505 Members | 14,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stop mouse clicking outside of popup box (IE 5.5)

I am using IE only for this control I am building. I have created a
rich text box that the user can popup (using dhtml and a div tag) to
allow the user to enter wiziwig html text. However, when the popup is
displayed, I would like to pervent the user from clicking outside of
the popup. I can get it to partially work by putting an onclick event
in the body tag and setting focus back to an element of the popup.
However, buttons are still activated before this body tag event is
called.

I thought maybe I could cover the entire page with a div and put the
rich text box div on top of it. Then the on click event for the page
covering div could put focus back on the Rich Text Box Div.

Then I thought that I must be tring to reinvent the wheel and that
someone must have a good solution for this!

Thanks for your help

Earl
Jul 20 '05 #1
2 1827
Earl T wrote:
I am using IE only for this control I am building. I have created a
rich text box that the user can popup (using dhtml and a div tag) to
allow the user to enter wiziwig html text. However, when the popup is
displayed, I would like to pervent the user from clicking outside of
the popup. I can get it to partially work by putting an onclick event
in the body tag and setting focus back to an element of the popup.
However, buttons are still activated before this body tag event is
called.


I've seen the whole-page div used as an event blocker (even did it
myself to implement a wait cursor...) but if it's IE only, and you're
emulating a "dialog like behavior" why not use the real thing?

Say it with me slowly, MSDN is my friend.

http://msdn.microsoft.com/workshop/a...odaldialog.asp

--
Alex Fitzpatrick
https://sourceforge.net/projects/jseditor/
Jul 20 '05 #2
Thanks Alex, That nails it!

Alex Fitzpatrick <al*********************@videotron.nospam.ca> wrote in message news:<To*********************@wagner.videotron.net >...
Earl T wrote:
I am using IE only for this control I am building. I have created a
rich text box that the user can popup (using dhtml and a div tag) to
allow the user to enter wiziwig html text. However, when the popup is
displayed, I would like to pervent the user from clicking outside of
the popup. I can get it to partially work by putting an onclick event
in the body tag and setting focus back to an element of the popup.
However, buttons are still activated before this body tag event is
called.


I've seen the whole-page div used as an event blocker (even did it
myself to implement a wait cursor...) but if it's IE only, and you're
emulating a "dialog like behavior" why not use the real thing?

Say it with me slowly, MSDN is my friend.

http://msdn.microsoft.com/workshop/a...odaldialog.asp

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3124
by: Jun | last post by:
How can I catch onMouseDown event on a frame/frameset? When I right mouse click at the border area of a frame, I can still get the Window's standard popup menu. How can I catch the mouse click...
6
25646
by: lauren quantrell | last post by:
I have a command button on a continuous subform and I want the user to click it to open a small popup form that opens in the position of the mouse (which is the same as the position of the command...
7
17119
by: Tyron | last post by:
I need to know if the Left Button of the Mouse is clicked in the WM_NCMOUSEMOVE Notification but this Message doesnt contain the Mouse Button States as WM_MOUSEMOVE does. So how can I get them? ...
2
2894
by: Sławomir Speth | last post by:
hi all How trap mouse click outside my control - like close popup menu
0
3149
by: 6tc1 | last post by:
Hi all, I've got a UserControl that contains a few PictureBox objects. If I click on outside of the Picture in the UserControl, the scrolling with the mouse button works - however, no amount of...
4
10751
by: Pucca | last post by:
How can I tell a mouse right clicks over a listview item that's in a container panel. I only want to display a popup menu if the user right click the mouse over an item on the Listview. I don't...
1
1295
by: stoprsi | last post by:
RSI Warrior 4.0 is an award-winning ergonomics software package helping thousands of computer users prevent and recover from computer-related Repetitive Strain Injuries such as carpal tunnel,...
4
5434
by: atn2002 | last post by:
How can I track the mouse coordinates outside the active window? No one can tell me its not possible because Google Spreadsheets and EditGrid both do it. When you drag down to select cells these...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.