View Single Post
Old 09-05-2012, 12:59 AM   PM User | #2
Logic Ali
Regular Coder

 
Logic Ali's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 957
Thanks: 0
Thanked 198 Times in 193 Posts
Logic Ali will become famous soon enoughLogic Ali will become famous soon enough
Quote:
Code:
document.getElementById(id).height= (newheight) + "px";
document.getElementById(id).width= (newwidth) + "px";
You are appending 'px' to the height attribute, which it does not expect.
Try either of the following:

Using height/width attributes:
Code:
document.getElementById(id).height = newheight;
document.getElementById(id).width = newwidth;
Using CSS
Code:
document.getElementById(id).height = (newheight) + "px";
document.getElementById(id).width = (newwidth) + "px";
Also you can lose if(document.getElementById)
Logic Ali is offline   Reply With Quote