Click to See Complete Forum and Search --> : i frame follow a mouse


pelegk1
03-16-2004, 07:21 AM
can i make iframe follow a mouse?then how?thanks in advance
peleg

Vladdy
03-16-2004, 07:26 AM
Why would you want to do that in a first place???

pelegk1
03-16-2004, 07:45 AM
on the screen on a position which he want to

Vladdy
03-16-2004, 08:06 AM
Try this:
http://www.vladdy.net/wca/popupEmulator.html

pelegk1
03-16-2004, 08:57 AM
and type there a url and nothing hapend

TheBearMay
03-16-2004, 09:19 AM
This is a little rough because I'm doing it on the fly, but should give you an option....

...
if (!document.all)
document.captureEvents(Event.MOUSEMOVES );
document.onmousemove = getOffsets;

function getOffsets (evt) {
var tempX, tempY;
if (document.all) {
tempX = event.clientX + document.body.scrollLeft;
tempY = event.clientY + document.body.scrollTop;
}
else {
tempX = evt.pageX+"px";
tempY = evt.pageY+"px";
}

document.getElementById("moveFrame").style.top = tempY;
document.getElementById("moveFrame").style.left = tempX;

...
<div id="moveFrame" style="position:absolute">
<iframe src="yourContent.htm"></iframe>
</div>
...

pelegk1
03-17-2004, 01:01 AM
maybe u have code that when i move the scroll bar of the IE down
it moves a text down with it always at the top center of the browser?
thanks in advance
pleg