I'm still pretty new to Javascript - surely there is some basic idea I'm missing here. I'm using the following code to change the width and height of a div, but Firefox doesn't want to play ball - only IE changes the width and height of the mainImageFrame div when this function is run:
Here is an example link:Code:function changeZoom(width,height) { window.resizeTo(width+270,height+150); document.getElementById("mainImageFrame").style.width=width; document.getElementById("mainImageFrame").style.height=height; }
<a href="javascript:void(0);" onclick="changeZoom(640,480)">640x480</a>
Firefox changes the window size to the specified size, but not the div. IE changes both. This function is just the latest iteration of my attempt to get the div to resize, so if I should be approaching this another way by all means let me know. I R NEWBIE!



Reply With Quote
Bookmarks