Help - Search - Members - Calendar
Full Version: Mt Resizes My Windows Every Time A Link Is Clicked!?
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
chrisjum
Ok check out my websites main page here at http://www.jonbarron.org. Click on one of the titles or the "continue reading" links for one of the featured blogs. When you do this in IE and in Firefox it resizes your current browser window down to about 150x150 pixels but it doesn't do this in Safari at all! Why is this? It never used to do this and I haven't messed with anything lately at all. Also it does this on my MT Admin Control Panel when you click the links on there such as "View Site" or "Preview", it also resizes the windows as well.

My guess is this is something JavaScript related since JS is what resizes browser windows but does anyone else know what might be going on here or how I go about fixing this?
chrisjum
Oh and just so everyone knows I'm using MT 4.01
Su-
There is nothing MT does itself that should cause that[1]. Remember that you have complete control over(and responsibility for) what comes out of your templates. You need to look at them and figure out what you put in them to cause it. There are at least two instances of Javascript on that page that deal with the window width. Maybe one of them is being greedy about what it responds to?

[1] The only thing I'm aware of that sizes windows is if you use generated image pop-ups, and that deals with pops, not the main window like this is.
chrisjum
QUOTE (Su- @ Dec 29 2007, 01:37 PM) *
There is nothing MT does itself that should cause that[1]. Remember that you have complete control over(and responsibility for) what comes out of your templates. You need to look at them and figure out what you put in them to cause it. There are at least two instances of Javascript on that page that deal with the window width. Maybe one of them is being greedy about what it responds to?

[1] The only thing I'm aware of that sizes windows is if you use generated image pop-ups, and that deals with pops, not the main window like this is.


The weird thing about this though is I haven't messed with anything in the templates or the code at all and it only started doing this the other day when we switched to a new server. It NEVER did this on the old server and I still had the same code...
chrisjum
Something else to think about is this... Why does this resize ONLY happen when you click on a Blog link? It doesn't happen when you click on any other link on my website EXCEPT the blog which leads me to believe this might be something to do with MT?

Also the other reason I think it must have something to do with MT is that when you login to the Admin Control Panel it does it on alot of those links as well such as the "Preview" link when you want to preview an entry before you post it or also the "View Site" button as well...
chrisjum
Well I fixed it... I removed THIS code from my header...

<script LANGUAGE='Javascript'>
var jsWidth = ' + ';
var jsHeight = ' + ';
if (jsWidth != ' & jsHeight != '){
if (navigator.userAgent.indexOf('MSIE') != -1) {
top.resizeTo(parseInt(jsWidth),parseInt(jsHeight));
}
else if (navigator.appName.indexOf('Netscape') != -1) {
top.outerWidth=parseInt(jsWidth);
top.outerHeight=parseInt(jsHeight);
}
}
</SCRIPT>

I was using that code to resize another window and the odd thing is that it never encountered a problem at all until I switched to my new server! I wonder what's up with that?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.