Help! different between onmousemove & onMouseover

hi
how r u ?

i have button, and i used both " onmousemove & onMouseover "
each one call special function , but they call finction at the same time @@ :nono::(:eek::mad::confused:
i want when i move over the button , user can see this text " Mouse is Over". however, he can see this text “Mouse is Mover” when move.

" onmousemove =“OnMove();” onMouseover =“OnOver();”


OnMove()
{
alert ( "Mouse is move");
}

OnOver()
{
alert ( "Mouse is Over");
}

Also i wanna make more control of the mouse movement over the button ,
for example
if the mouse move to right i want text " move to right"
it the mouse move to left i want text “move to left”

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title></title>
<script type="text/javascript">
/*<![CDATA[*/

function mse(e,obj){
  var lft=e.pageX;
  if (window.event){
   lft=e.clientX+document.documentElement.scrollLeft;
  }
document.Show.Show0.value=lft>obj.offsetWidth/2?'right':'left';

 }


/*]]>*/
</script></head>

<body>
<input type="button" name="" value="Mouse Move Button" onmousemove="mse(event,this);"/>
<script> vic=0; </script>
<form name=Show id=Show style="position:absolute;visibility:visible;top:700px;left:0px;" >
<input size=100 name=Show0 >
<input size=10 name=Show1 >
<input size=10 name=Show2 >
<input size=10 name=Show3 >
<input size=10 name=Show4 >
<input size=10 name=Show5 >
<input size=10 name=Show6 >
<input size=10 name=Show7 >
<input size=10 name=Show8 >
<input size=10 name=Show9 ><br>
<textarea name=TA rows=1 cols=100 ></textarea>
</form>
</body>

</html>

thank u

but i want the movment be free
i mean when user move in any place in the button or any object, u c txt " right" and if change to left , directlly u c "left

i want some thing control on the mouse pointer

coz i wanna do some effect if the mouse movement go to right , and i don’t do any thing if mouse movement go to left

You need to test the current mouse position and compare it to the position when the move was first triggered.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title></title>
<script type="text/javascript">
/*<![CDATA[*/

function mse(e,obj){
  var lft=e.pageX;
  if (window.event){
   lft=e.clientX+document.documentElement.scrollLeft;
  }
  if (!obj.lft){
   obj.lft=lft;
  }
  if (Math.abs(obj.lft-lft)>0){
document.Show.Show0.value=lft>=obj.lft?'right':'left';
  }
  obj.lft=lft;
 }


/*]]>*/
</script></head>

<body>
<input type="button" name="" value="Mouse Move Button" onmousemove="mse(event,this);"/>
<script> vic=0; </script>
<form name=Show id=Show style="position:absolute;visibility:visible;top:700px;left:0px;" >
<input size=100 name=Show0 >
<input size=10 name=Show1 >
<input size=10 name=Show2 >
<input size=10 name=Show3 >
<input size=10 name=Show4 >
<input size=10 name=Show5 >
<input size=10 name=Show6 >
<input size=10 name=Show7 >
<input size=10 name=Show8 >
<input size=10 name=Show9 ><br>
<textarea name=TA rows=1 cols=100 ></textarea>
</form>
</body>

</html>

hey
thanks for ur help ,
i have tried but haven’t done :frowning:

function mse(e,obj){

var lft=e.pageX;
if (window.event){
lft=e.clientX+document.documentElement.scrollLeft;

if(lft>obj.offsetWidth*2.5){
alert(“rightttt”)
collapse2(obj);

expand3(obj);
//alert(“right3333333ttt”)

}else {
alert(“left”);
expand2(obj);
}
}
}

vwphillips :tup: :tup: :tup: :tup:

thank u :cheer: :cheer2: :blush:
thank u
thank u
reallllllyyyyy thanksssssssssssssssss