473,383 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

restrict mouse motion

On my page I have a div appear, positioned next to the cursor, after
dragging and dropping. The div contains radio buttons for what action is to
be performed. A person selects which radio button and clicks OK, or clicks
cancel.

I want to restrict mouse motion to stay within the div, if the div is
visible. There is also an iframe under the div. Some browsers require the
div and iframe to be positioned together.

I can't figure out how to do this. I saw this done when viewing a video at
one site, and can't remember the site. The mouse was trapped inside the
movie square, and it was impossible to move the mouse to any other part of
the page.

Please help. Thanks

--
dgm
Oct 23 '07 #1
7 3774
On Oct 22, 9:53 pm, David McDivitt <david-...@del-subjectivist.org>
wrote:
On my page I have a div appear, positioned next to the cursor, after
dragging and dropping. The div contains radio buttons for what action is to
be performed. A person selects which radio button and clicks OK, or clicks
cancel.

I want to restrict mouse motion to stay within the div,
I've never heard of any way to do this and hope it is not possible in
any browser on my computer. It is your web page but it is *my* mouse.
What if I don't want my mouse stuck in your div?

if the div is
visible. There is also an iframe under the div. Some browsers require the
div and iframe to be positioned together.

I can't figure out how to do this. I saw this done when viewing a video at
one site, and can't remember the site. The mouse was trapped inside the
movie square, and it was impossible to move the mouse to any other part of
the page.
Scary.

Peter

Oct 23 '07 #2
rf

"David McDivitt" <da*******@del-subjectivist.orgwrote in message
news:rr********************************@4ax.com...
On my page I have a div appear, positioned next to the cursor, after
dragging and dropping. The div contains radio buttons for what action is
to
be performed. A person selects which radio button and clicks OK, or clicks
cancel.

I want to restrict mouse motion to stay within the div, if the div is
visible. There is also an iframe under the div. Some browsers require the
div and iframe to be positioned together.
And what if your viewer wants to move the mouse cursor to the kiss at the
top right and close their browser bacause your site appeared to cause it to
break?

--
Richard.
Oct 23 '07 #3
David McDivitt wrote:
On my page I have a div appear, positioned next to the cursor, after
dragging and dropping. The div contains radio buttons for what action is to
be performed. A person selects which radio button and clicks OK, or clicks
cancel.

I want to restrict mouse motion to stay within the div, if the div is
visible. There is also an iframe under the div. Some browsers require the
div and iframe to be positioned together.

I can't figure out how to do this. I saw this done when viewing a video at
one site, and can't remember the site. The mouse was trapped inside the
movie square, and it was impossible to move the mouse to any other part of
the page.

Please help. Thanks

--
dgm
Please check http://sublog.subimage.com/articles/2006/01/01/subModal
It allows cursor to move, but it can't do anything as good modal is
supposed to do

--
intrader
Oct 23 '07 #4
>From: intrader <in******@aol.com>
>Date: Mon, 22 Oct 2007 22:52:51 -0700
Lines: 25

David McDivitt wrote:
>On my page I have a div appear, positioned next to the cursor, after
dragging and dropping. The div contains radio buttons for what action is to
be performed. A person selects which radio button and clicks OK, or clicks
cancel.

I want to restrict mouse motion to stay within the div, if the div is
visible. There is also an iframe under the div. Some browsers require the
div and iframe to be positioned together.

I can't figure out how to do this. I saw this done when viewing a video at
one site, and can't remember the site. The mouse was trapped inside the
movie square, and it was impossible to move the mouse to any other part of
the page.

Please help. Thanks

--
dgm
Please check http://sublog.subimage.com/articles/2006/01/01/subModal
It allows cursor to move, but it can't do anything as good modal is
supposed to do
Cool! That's about what I want. I will see about implementing it when I get
to work tomorrow. Thanks

--
dgm
Oct 23 '07 #5
On Oct 23, 2:04 am, David McDivitt <david-...@del-subjectivist.org>
wrote:
From: intrader <intra...@aol.com>
Date: Mon, 22 Oct 2007 22:52:51 -0700
Lines: 25
David McDivitt wrote:
On my page I have a div appear, positioned next to the cursor, after
dragging and dropping. The div contains radio buttons for what action is to
be performed. A person selects which radio button and clicks OK, or clicks
cancel.
I want to restrict mouse motion to stay within the div, if the div is
visible. There is also an iframe under the div. Some browsers require the
div and iframe to be positioned together.
I can't figure out how to do this. I saw this done when viewing a video at
one site, and can't remember the site. The mouse was trapped inside the
movie square, and it was impossible to move the mouse to any other part of
the page.
Please help. Thanks
--
dgm
Please checkhttp://sublog.subimage.com/articles/2006/01/01/subModal
It allows cursor to move, but it can't do anything as good modal is
supposed to do

Cool! That's about what I want. I will see about implementing it when I get
to work tomorrow. Thanks
I wouldn't. It is a bad design (IFrame popups only), poorly
implemented (relies on browser sniffing) and way out of date.

Try this instead:

http://code.google.com/p/niceshowcase/

This was never meant to simulate modality, so it doesn't try to
suppress the tab key or mess with tab indeces of form elements. The
other one tries to do this, but the implementation is too incompetent
to be reliable.

One good thing that the other one does is to hide SELECT elements when
the "curtain" is raised (something I should add to mine.) But
unfortunately, even that simple feature relies on browser sniffing.
Unbelievably, the sniffing logic excludes IE7. Even worse, if
SELECT's were hidden before the "modal" operation, they won't be when
it is done.

Oct 23 '07 #6
Thanks all! i have been searching this for a while...
but when there is a active-X object beneath in the page, the popup (or
what ever you call it) doesn't work. the activeX just stays on top of
all.
say a media player object is in the web page, when the popup appears
the media player stays on top of everything.
any ways i found a way for SWF object... add this param (<param
name="wmode" value="transparent" />) and it stays beneath.
likewise whats the way for other common activeX objects (wmp player,
applet, swd, etc) is there a common way
where am i wrong
thankq - cforcloud

Oct 23 '07 #7
On Oct 23, 8:30 am, cforcloud karulvan <cforcl...@gmail.comwrote:
Thanks all! i have been searching this for a while...
but when there is a active-X object beneath in the page, the popup (or
what ever you call it) doesn't work. the activeX just stays on top of
all.
say a media player object is in the web page, when the popup appears
the media player stays on top of everything.
any ways i found a way for SWF object... add this param (<param
name="wmode" value="transparent" />) and it stays beneath.
I think anything other than "window" (e.g. transparent, opaque) will
work.
likewise whats the way for other common activeX objects (wmp player,
applet, swd, etc) is there a common way
where am i wrong
Hide them when you show the popup and vice versa. Same goes for
SELECT elements as they have the same issue in IE.
Oct 23 '07 #8

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

Similar topics

7
by: Domenique.Tilleuil | last post by:
hello, Is there an event simular to the java event onMouseOver ? I want to get the coordinates of the mouse pointer when it is over an image ( GTKImage widget) I've tried using the EventBox...
1
by: DaBo$$ | last post by:
hi ! I have created a program which move mouse cursor, but i want to : 1- stop physical mouse move. 2- when a press a keyboard button, execute the same action if a press the mouse button. ...
1
by: Fei Li | last post by:
Hi, Suppose my form has menu, tool bar, tool panel and drawing panel. How to restrict user mouse, say, in the area of tool bar and drawing panel? Thanks
0
by: Csharper95 | last post by:
I'm looking for a way to activate, give focus to the child window in the Multiple Document Interface environment while it is being or rather just before it is being dragged. I have used...
7
by: tommaso.gastaldi | last post by:
This is a curious question. I'd like to know your opinion. I am attaching a drawing resize to a mouse wheel event. Frankly, to me was most natural that, if I mouse wheel UP, the shape gets...
0
by: ck.kislay | last post by:
When I passed bounding area ( Location,height ,width )of a Window control to the ClipCursor API it restrict the mouse in screen coordinate ,Its fine because ClipCursor works on Screen coordinate....
5
by: nuhfeken | last post by:
We have a C# winform that uses the MVP design pattern for the user interface. For reasons I'd rather not explain we need to simulate a right mouse click on a specific control to deactivate the...
1
by: Narcolessico | last post by:
Hi, I'm writing on Linux an application which needs to move the mouse pointer and simulate button clicks (better: button press and release events separately, e.g. to do drag&drop). I found...
1
by: valy | last post by:
hi guys, do y'all have any idea about writing a function to calculate the amount of white pixels on a difference image, and if the white amount is >= the threshold value then the image is count as...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.