Hi, I'm new to this forum & JAVA programming .... ... I've been roped in to do a web site for my wife as part of her MA submissions .... hope someone can help. I'm would like to open a window with the dimensions relative to the viewers screen size ... the code I currently use is at the end. Currently I have to have 3 definitions for everything. Is it possible to use simple maths to alter the "'width=650 height=600 left=250 top=20," functions + can I alter fonts in the same way ???.
Thanks in advance for any responses.
<!-- Begin if (screen.height >= 768){ var adj=2; window.open('docs/main-1024-4.htm', 'main', 'width=650 height=600 left=250 top=20, scrollbars=yes, resizable'); window.opener="top"; window.close(); } else { if (screen.height == 600){ window.open('docs/main-800.htm', 'main', 'width=640, height=450, left=2, top=1, scrollbars=yes, resizable,'); window.opener="top"; window.close(); } else { if (screen.height == 480){ window.open('docs/main-640.htm', 'main', 'width=610, height=420, left=1, top=1'); window.opener="top"; window.close(); } } } // End -->