Switch Content - problem in Mozilla based browsers
Script: Switch Content Script
There is a problem with the Switch Content Script when using it in a Mozilla based browser. I don't know if the problem is with the script or with the Mozilla code itself. In Mozilla browsers (Mozilla, Firefox, Netscape, etc.), when you contract an expanded section, the size of the page does not contract with the contracted section. This is most noticeable when contracting a very large section. A large blank area appears at the bottom of the page. However, this problem does not appear in Internet Explorer or Opera. Is there anyway to fix this problem? I noticed it on a website I am developing. I also noticed it on this page here at Dynamic Drives:
yup.. i have this also.. and ontop of this problem i have another one. ive made a post of it.
basicly my dynamic fx slide out menu. wont slide back in if my mouse goes from the menu to the iframe i use. i have to take my mouse off the iframe and the menu for the onmouseout to occur and my menu to slide back in.
likewise. ie doesn't do this and all works normaly.
Last edited by jemila; 08-18-2005 at 04:39 PM.
my problem was solved by including a mouseover command to the iframe as well.. not just the menu. kina doens't make sence coding wise becaues doesn't fix the problem just creates a solution. but i am very happy
as for the resize thing. its resizes the frame if its a local page. but it isn't resizing the original window as well. i think this is related to my problem because i belive firefox is treating iframes as a seperate window not a imbeded window
sooo a resize comand will have to be added to both the page the iframe is in and the iframe because firefox is keeping them seperate somehow.
not so with ie
So, how do you do the resize command?
I've come across this before but, I forget how it was resolved. I do remember fixing it though. If you have a link to your page that has this problem, it will make finding a solution easier:
PLEASE: Include the URL to your problematic webpage that you want help with.
Well, I did provide one. It is clearly seen on:
This makes me believe it will happen on any page with the Switch Content Script.
Here is my page:
To see what kinds of extremes this can take, try opening and closing a news thread way at the bottom entitled: "HMC Introduces TeleFusion service". The green bar at the bottom is always suppose to be at the very bottom. In Mozilla based browsers, it jumps up the page with white space below it when opening and closing a Switch Content item.
I don't see any problems. Not with my recent version of Firefox, nor with older versions of Mozilla (I have minor versions 1.3 through 1.7).
Originally Posted by TheDoc
Try it on the site I posted. Make sure to look at the bottom of the page and note where the green bar is at the bottom. Then open a story. Then close it. Then look at the green bar at the bottom again. It should now have white space after it.
Originally Posted by mwinter
I see it. Mike, try scrolling his page down to the bottom both before and after opening and closing a story. The white space gets added after the green bar.
TheDoc & Mike, it is noticeable on the demo page here at DD only if you are really, really looking for it as it is simply not that much extra space.
Anyways, you have another problem. Id's that begin with numbers and that are unquoted. This most likely is unrelated but, using id's that begin with numbers ex:
is a bad practice as many browsers will not recognize them as id's for pure style purposes. It may even be a part of the problem. Is there any way that the id could be say,
I'll get back to you on possible solutions. It noticed there was a height="100%" on the page. That should be unnecessary in most cases and could be part of the problem.
The fact that it shows up on this site's example should mean that it isn't unique to anything related to my page. Because of the way the div's are working, the 100% height is needed for Internet Explorer to display properly. I tried removing just to see what happens; and, as far as the page not contracting when contracting a switch content area in a Mozilla browser, it didn't make a difference. I will see what I can do with the ID number with quotation marks and starting with a letter instead of a number. Really, I don't think that is the problem if I can replicate the effect on this site's example.
Last edited by TheDoc; 08-19-2005 at 06:08 PM.