• Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] dynamic applet sizing

This topic is 6056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just wondering if there was a way to assign the width and height of the applet according to the size of the window when the page was loaded. Thank you, -lao

Share this post


Link to post
Share on other sites
Advertisement
Have you tried width=x% and height=x% in the applet tag? It works with image tags and tables, so there''s a chance it''d work with applets...

Share this post


Link to post
Share on other sites
Use java-script, detect the window size then do a document.write to dynamically set the width and height of the applet.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi!

First of all; the solution proposed by c_wraith doesn''t work with all browser. If I remember correctly, it only works with Internet Explorer.

Second; bslayerw, could you please show me the java-script code to set the size? We have tried something similiar, but we ran into trouble when the connection was bad. If the java-script was executed before the important Java classes was loaded, the Java applet didn´t get the call from the java-script. We delay the java-script by about half a second. However, this could fail if the connection is really slow.

It would be nice if bslayerw''s solution worked better than our solution:-)

Regards
Johan

Share this post


Link to post
Share on other sites

  • Advertisement