Click on the link below to open a separate browser window with a MarvinSketch applet. The applet size is changing as you resize the new browser window.
The html code of the resizeable applet page is as follows:
<html> <head> <title>Resizeable sketcher</title> </head> <body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0' onLoad='resize()' onResize='resize()'> <SCRIPT type="text/javascript">
function resize() {
if (navigator.appName.indexOf("Microsoft") != -1) {
window.width=document.body.clientWidth;
window.height = document.body.clientHeight;
} else {
var netscapeScrollWidth=15;
window.width = window.innerWidth - netscapeScrollWidth;
window.height = window.innerHeight - netscapeScrollWidth;
}
document.MSketch.width = window.width;
document.MSketch.height = window.height;
window.scroll(0,0);
}
window.onResize = resize;
window.onLoad = resize;
<script type='text/javascript' SRC='../../../marvin.js'></script>
<script type='text/javascript'>
msketch_name = 'MSketch';
msketch_begin('../../..', window.innerWidth, window.innerHeight);
try {
msketch_end();
} catch(e) {
}
</script> </body></html>