C
Catherine Lynn Smith
I want to use javascript to build page elements using onLoad but I
seem to be having trouble defining the width value of an IMG tag if I
create it with javascript.
If I build the element with HTML it works just fine with:
<img src="foo.gif" width="100%" height="100">
But if I try to create it within the javascript, it will not work.
imgObj = createElement('img');
imgObj.width = "100%";
Is there a way to do this?
KL
seem to be having trouble defining the width value of an IMG tag if I
create it with javascript.
If I build the element with HTML it works just fine with:
<img src="foo.gif" width="100%" height="100">
But if I try to create it within the javascript, it will not work.
imgObj = createElement('img');
imgObj.width = "100%";
Is there a way to do this?
KL