• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 740
  • Last Modified:

Mozilla issue with JavaScript, screen.availHeight and <iframe>

I ran into an interesting issue this morning - maybe one of you will have a solution. I can get the height of a browser window using screen.availHeight in Mozilla/IE, just fine, but when there's an <iframe> on the page, Mozilla pukes. For more information, please see:

http://stage.onpointdigital.com/sandbox/new/height.html

This is a complete stand-alone file, so feel free to view-source and save for debugging purposes.

Thanks,

Matt
0
mraible
Asked:
mraible
  • 2
  • 2
1 Solution
 
AspCommented:
What version of IE you are using? In IE6 it works just fine, I guess it's a bug when focused on the iframe.

Ps. IE 4 usually has/had many of these bugs
0
 
mraibleAuthor Commented:
Notice from my original question that this is a problem with Mozilla, not IE.  

I'm using version 1.3 on Windows XP.
0
 
niteshnCommented:
Problem is with the name of the iframe you are adding. You are using the default javascript object name screen as the name of the iframe window which now overrides the default object and hence the error. Change the name of the window in your addIFrame method and things will work fine!
0
 
AspCommented:
Sorry, read too fast :)
0
 
mraibleAuthor Commented:
Boy am I an idiot - oh well, I love easy solutions!
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now