Heres the deal : I need to write a javascript code that essentially flips a given image over the x-axis. I keep getting an error "error in parsing value for property 'top'. I want to take a picture that is on the screen, make a new div like 100 pixels below it, and then output the upside down picture.
Here's the code:
Code:
<html>
<head>
<style type="text/css">
div {overflow:hidden; position:absolute;}
span {position:absolute;}
</style>
<script type = "text/javascript">
</script>
</head>
<body>
<span style="left:0px; top:150px; width:750px; height:71px">
<img src="project2.jpg"/>
</span>
<script type = "text/javascript"><!--
for(var k=71;k>0;k--)
{
document.write("<div style='left:0; top: (300 + "+k+"); width:750; height:1'>");//create the div block
document.write("<span style='left:0; top: -("+k+" - 71);'>");//create the span block inside the div block
document.write("<img title='newpic' src='project2.jpg'/>");//put the image in the span
document.write("</span></div>");//close everything
}
//-->
</script>
</body>
</html>