Help Required! PLEASE!!!!

wxdqz

New Member
Hi every1!
I am a newbie in JavaScript and thus need ur help on the following issue:

i have written this code in my index.htm file:





<script language = "JavaScript">

function openw() {
w = screen.width;
h = screen.height;

if (w >= 1280 && h >= 1024) {
finalw = 800
finalh = 400
}
else if (w >= 1024 && h >= 768) {
finalw = 600
finalh = 400
}
else if (w >= 800 && h >= 600) {
finalw = 400
finalh = 200
}
else {
finalw = 200
finalh = 100
}
window.open ('main.htm','','width='+finalw+',height='+finalh);
}

function makeNewWindow() {

var n_win;
var windowProps;


windowFeatures = "top=0, left=0, resizable=no" +",width=" + (window.innerWidth = screen.width)+",height=" + (window.innerHeight = screen.height);
newWindow = window.open ("main2.htm",'',windowFeatures)
newWindow.focus();

}


these 2 fucnctions r working correctly... but the only problem is that a pc doesn't use the full resolution while opening a browser window... thus if on 1280x1024 a popup window appears having the same width and height... some of the window isn't visible! u can visit <!-- w --><a class="postlink" href="http://www.themightythor.com">www.themightythor.com</a><!-- w --> to see what i exactly want. when u enter this site... the window resizes to the resolution u r currently using and keeps itself on top! i have tried reading its script but its way too advanced for me....

please guyz... this thing is killing me!!! please help me with this!!! i have already tried using window.innerHeight and width but it didn't work!
 
Back
Top