hi I've been trying to add VML image elements using javascript. now here is what I'm using to generate these images:
function add_tools()
{
var elemm = document.createElement('rvml:image');
elemm.setAttribute('src', 'pic.png');
elemm.setAttribute('id', 'gogo');
elemm.setAttribute('class', 'rvml');
document.body.appendChild(elemm);
document.getElementById('gogo').style.position='absolute';
document.getElementById('gogo').style.width=55;
document.getElementById('gogo').style.height=55;
document.getElementById('gogo').style.top=200;
document.getElementById('gogo').style.left=300;
document.getElementById('gogo').style.rotation=200;
document.getElementById('gogo').style.display = "block";
}
usually when I generate vml image element the HTML code should look somthing like:
<rvml:image style="POSITION:absolute; WIDTH:55px; HEIGHT:55px; TOP:0px; LEFT:0px; rotation:0;" src="pic.png" id=gogo class=rvml>
now the above javascript function works with HTML elements. but when I use it to generate VML elements. the generated element doesn't show in the browser. but when I check document.body.innerHTML. I can see that the element has been actually created. but its not showing..
any ideas? is there any method I can use to refresh or redraw elements with javascript. or anything I can use to fix this.
thanks