This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a web page with an applet (using object tag) inside a div region which can be seen [url=http://www.lagers.org.uk/temp/applet/indexjs_2.html here[/url].
The problem I have is that the Java layout for the applet is fixed size but when using the mouse wheel to zoom in/out of the webpage the 'applet area' increases and what I want to enforce a maximum size.
I have posted the page source inside the body tags below. Sorry about the length but the resize stuff is near the end.
The applet I have created is a fixed size 660px by 420px and when the browser zoom is 1.0 then it sets aside an area 660px x 420px which is good. Now when the mouse wheel is used to zoom in then it increases the area set aside for the applet. So if the zoom level is 2 it sets aside 1320x840px but I want this area to remain as 660x420px.
The applet object has an id 'myapplet' and the div id is 'AppletDiv' and the code in size_changed is my effort to control the applet size
by changing the applet_height and applet_width variables depending on the zoom level (r.zoom)
Obviously there's something I'm missing here, because if I wanted something to have a size of 660 by 420 px, I would just style it to have that size and not do anything else.
Perhaps it's that "browser zoom" concept I'm missing. What is that anyway?