finding page height
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
finding page height
ok sorry this may not be done in php but i cant find anywere else to ask how to do this. i have a page that detects your browser then based on that it excecutes a certain code that streches the iframe. well all works good with firefox but IE has major problems. what i need to do is find the height of the page in the iframe then set that height to the height of this one cell. so my question is how do i find the height of a iframe in pixels?
this could definately be done, but it would have to be done through something like javascript. you coudl tell javascript that while an ondown mousebutton was in action, to echo out the height of the page to a variable whenever a mouseup action occurs after the mousedown.. best way i can think of to do it.
this should at least get you started :
onload event - http://www.devguru.com/Technologies/ecm ... nload.html
Mouse Events - http://www.quirksmode.org/js/events_mouse.html
Defining Variables - http://javascript.about.com/library/bltut02.htm
Determining Window Size - http://www.javascripter.net/faq/browserw.htm
onload event - http://www.devguru.com/Technologies/ecm ... nload.html
Mouse Events - http://www.quirksmode.org/js/events_mouse.html
Defining Variables - http://javascript.about.com/library/bltut02.htm
Determining Window Size - http://www.javascripter.net/faq/browserw.htm
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
arg ok i did
but sadly enough it dosnt work with IE. the whole porpus of this is to get cells to strech properly in IE but nothing that would work is compatable with it. Maybe there is a way i can just keep certain cells from changing their height while letting others change their height? or maybe there is some javascript that is compatable with IE?
Code: Select all
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="e;Netscape"e;) {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("e;Microsoft"e;)!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
document.write(
"e;Window width = "e;+winW+"e;<br>"e;
+"e;Window height = "e;+winH
)