Thread: move text
View Single Post
  #6 (permalink)  
Old 11-16-09, 12:56 AM
hemi hemi is offline
Wannabe Coder
 
Join Date: Aug 2009
Posts: 117
Thanks: 15
Thanked 0 Times in 0 Posts
well Mr.Wirehopper thnks for tht post . I done some similar thing but it is giving a satisfactory output but not the exact required output (bellow is the code) in ur code when i click on the test it just goes to the center of the page but in my code it slowly goes to center (not exactly) of the page. it will be great if u suggest me how to do it . Once check my code and can u tell me if it can exactly goes to center of the page
-----------------------------------------------------------------------
<html>
<head>
<title>Moving an Image</title>

<script language="JavaScript">
Hmove=100;
function moveObjRight(obj)
{
obj.style.left=Hmove;

obj.style.top=Hmove;





Hmove+=5;
if(Hmove<350)
window.setTimeout("moveObjRight(" +obj.id+ ");", 0);
}

</script>
<body>


<table border=0 height=600 width=1024><tr><td>
<p><div id=Jt style="z-index: 0; center: 10px; position: absolute; top:50px"
onclick=moveObjRight(this);> <strong>Sachin Tendulkar </strong></div></p>
</td></tr></table>


<script language="JavaScript">

</script>
</p>
</body>
</html>
-------------------------------------------------------------------------
Mr.End User the code is working for me when i put 'e' instead of 't'
Reply With Quote