Jump to content

[SOLVED] Preventing Forced Resizing


OLG

Recommended Posts

Hi there,

 

As the title of this subject suggests, im looking for a way of preventing a third party site that i opened using the Prototype Window Class from forcing a resize.

 

(Prototype: http://prototype-window.xilinus.com/)

 

The specific function is here:

 

function checksize() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement &&
			( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}

	if (myWidth != '1255' || myHeight != '800')
		document.write("<img width=1 height=1 src=\"/setres.php?height=" + myHeight + "&width=" + myWidth + "\">");
}

 

The problem is - that it forces the Prototype window to resize to full - which then causes it to jump to a new tab (in Internet Explorer 7 and Mozilla Firefox). This is counter intuitive because the window has certain functions that are extremely useful which are lost after the resize.

 

I hope im making some sense here? :>)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.