This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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)
use javascript to set the myapplet and AppletDiv objects with
This is my first effort to use JavaScript in a meaningful way so a lot of what I am doing is hack and see so any suggestions are welcome.
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?
And as far as I can see the question has nothing at all to do with applets (except that it happens to be an applet that you're trying to style). I'm going to move the thread to the forum about Javascript.