How can I detect a Scrollbar presence ( using Javascript ) in HTML iFrame ?
I have already tried :
var vHeight = 0;
if (document.all) {
if (document.documentElement) {
vHeight = document.documentElement.clientHeight;
} else {
vHeight = document.body.clientHeight
}
} else {
vHeight = window.innerHeight;
}
if (document.body.offsetHeight > vHeight) {
//when theres a scrollbar
}else{
//when theres not a scrollbar
}
And I also had tried :
this.scrollLeft=1;
if (this.scrollLeft>0) {
//when theres a scrollbar
this.scrollLeft=0;
}else{
//when theres not a scrollbar
return false;
}
With no success..
I have searched the javascript objets on DOM Inspector, but didn't find anything.
Is is possible to detect a scrollbar presence in a iframe in javacscript ?