Jump to content

what is the problem?


riddhi

Recommended Posts

In the javascript I am retriving the picture name from database and showing as footer which I want the images to move in a row wise fashion I have written the following PHP code

echo "<p><img src=$cat_image id='myImg' style='z-index: 0  left: -100px  position: absolute  top: 50px'></p>";
        echo "<p>"; 
        echo "<script language='JavaScript'>";
    echo "moveObjRight('myImg')";
	echo "xCo =-100";
        echo "function move(obj){";
	echo "obj.style.left=xCo";
   	    echo "xCo +=2";
   	    echo "if(xCo < 100) {window.setTimeout('move(' +obj.id+ ')', 0)}";
         echo "}";
         echo "</script> </p>";
     }// End While Loop		

Link to comment
Share on other sites

Sorry to be late her is the code  :'(

 

<script language='Javascript' type='text/javascript'>
xCo =-100;
function moveObjRight(obj)
{
obj.style.left=xCo;
xCo +=2;
if(xCo < 100) {
window.setTimeout('moveObjRight(' +obj.id+');', 0);
}
}
</script></head>

<p> 
<img id='myImg' src='/plaincart/images/product/f3738c5176628516539b1c09140d792f.jpg' style='z-index: 0 
	      left: -100px position: absolute top: 50px'>
</p> 
<script language='JavaScript'>
moveObjRight('myImg');
</script>
<p> 
<img id='myImg' src='/plaincart/images/product/182211127b3b784ff1db58d7260232a5.jpg' style='z-index: 0 
	      left: -100px position: absolute top: 50px'>
</p> 
<script language='JavaScript'>
moveObjRight('myImg');
</script>
<p> 
<img id='myImg' src='/plaincart/images/product/d92736b4f40f5d4a9a1c1913446e63d1.jpg' style='z-index: 0 
	      left: -100px position: absolute top: 50px'>
</p> 
<script language='JavaScript'>
moveObjRight('myImg');
</script>
<p> 
<img id='myImg' src='/plaincart/images/product/003e5198a07571ec000bc6c183d80dfd.jpg' style='z-index: 0 
	      left: -100px position: absolute top: 50px'>
</p> 
<script language='JavaScript'>
moveObjRight('myImg');
</script>
<p> 
<img id='myImg' src='/plaincart/images/product/a2d2d31be217aaabdccdf565512212d5.jpg' style='z-index: 0 
	      left: -100px position: absolute top: 50px'>
</p> 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.