OLG Posted July 8, 2007 Share Posted July 8, 2007 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 https://forums.phpfreaks.com/topic/58922-solved-preventing-forced-resizing/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.