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

restrict mouse motion

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


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

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

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

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

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

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.