I am trying to make my company's website viewable thru multiple browsers and I'm running into some issues. The site contains an iframe where the content for each link is displayed when navigating the website similar to a traditional frames page. I have coded so when a new page is loaded in the iframe then it runs thru a function that resizes the main page containing the iframe. My code works fine for IE but not for Firefox and I haven't tried any other browsers yet. Here is the code that works for IE:
function adjust_page(){
menuadjust = 144
minheight = 500
contentheight = page.document.body.scrollHeight
ShowOptions()
if(contentheight < minheight){
page.frameElement.style.height = minheight
navmenu.style.height = minheight - menuadjust - 30
}
else{
page.frameElement.style.height = contentheight
navmenu.style.height = contentheight - menuadjust - 30
}
}
The bold section is where Firefox is complaining, saying "page.document has no properties". It also says "Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.". Does anyone have a simple answer to fix the above code so that it works for Firefox and continues to work in IE as well. Any help would be greatly appreciated.
Matt