Click to See Complete Forum and Search --> : dynamic mousemove change


Sam
10-03-2003, 06:19 PM
hi, I've got a question on a line of code
document.write('<div id=toolbarmove style="position:absolute;left:0;top:0"><img src="c_hair.gif" onclick="zImg.style.cursor=\'move\'" onmousedown="document.body.onmousedown=\'document.body.onmousemove=followmouse()\'" alt="Click then drag the map to view different portions"></div>');
I realize that this doesn't work, but is there a way i can make the effect I was shooting for here work?
In otherwords, can I have one items onclick set another items mousedown which sets another items mousemove?

Jona
10-03-2003, 10:33 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en-US">
<head><title>James</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript"><!--
function run(){document.title="Jon";}
//--></script>
</head><body>
<p><a href="#" onclick="document.onmousedown=function(){document.onmousemove=run};">From James to Jon</a></p>
</body></html>


[J]ona