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:
[COLOR=red]
<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 1280×1024 a popup window appears having the same width and height… some of the window isn’t visible! u can visit [url]www.themightythor.com
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!