Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script to resize browser's window (doesnt work properly) plz check it

Status
Not open for further replies.

baad

Programmer
Apr 10, 2001
1,481
RU
hi guys!

i've got a function that (i want it to) prevents user from seting sizes of a browser window less than 700x370

function Resizin(){
w=document.body.clientWidth;
h=document.body.clientHeight;
nw=(w<=700)?(700-w):0;
nh=(h<=370)?(370-h):0;
self.resizeBy(nw,nh);
}

then for NC i write in this script
document.captureEvents(Event.resize)
document.onresize=Resizin


and for IE in body tag <body onresize=&quot;Resizin()&quot;>

the problem('s) :

1. it doesnt work in NC [why?]

2. well, it works in IE for now, but only on PC (i can tell about IE5.0 win98 only - i havent any other version)
on Mac it kinda works, but very weird
the window resizes to huge sizes but scrollers (if there are scrollers) come to my needed position (700x370)

what'da?

can anybody tell me how to fix these bugs?

thanks for your time, vic
 
well, i saw at last that i'm using 'document.body.clientWidth/Height' - therefore it doesnt work in NC (there must be 'window.innerWidth/Height')

but what about mac?
comon, guys! i dont belive that no one havent met this bug before... what shuld i do?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top