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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize function 2

Status
Not open for further replies.

micawber

Programmer
Dec 10, 2002
71
GB
I use the code below to resize my popup windows.
I would like to change it so that if the open window is already larger that the current size, it doesn't do anything.
Can anyone help?

Code:
<script type="text/javascript">  
  ResizeTo(100, 100);
</script>


function ResizeTo( intWidth, intHeight) {
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			top.outerWidth=intWidth;
			top.outerHeight=intHeight;
		}
		if (navigator.appName=="Safari") {
			self.resizeTo(screen.availWidth=960,screen.availHeight=700);
			top.outerWidth=intWidth;
			top.outerHeight=intHeight;
		}
	else top.resizeTo(intWidth,intHeight);
	}
}
 
Tsuji,
Yep both resize functions work. Sorry, what i mean by "not work" is it doesn't do what i want it to. i.e Only resize if the window opened is smaller.
How do you mean stuffy?
Thanks!
 
>How do you mean stuffy?
How do I mean stuffy? Honestly, I mean a lot of stuff in it, even bulky that the author of it may perceive them as worthy of gold, that any person of no concern may perceive it as worthless because it must have grown to a size that it masters the author rather than the other way around.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top