I have simplified my code in order to just get to the point with my question.
This is my html code:
Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- </head>
- <body>
- <img id="img1" src="images/smile.jpg" style="border:#0000FF solid 2px;"/>
- <script language="javascript">
- my_image = new Image;
- my_image.src="images/sad.jpg"; my_image.style.border="#FFFFFF solid 5px";
- x=document.getElementById("img1");
- x=my_image;
- </script>
- </body>
- </html>
I want to do an image slicing within an html document so I would be updating that object with different images and properties through an adequate set of controls and javascript events of course, this code is just the idea to present my problem.