I am working on a website here. I am using iframes for the navbar and footer. Because of IE 8 and older I must set the following attributes on the iframes: allowtransparency="true", frameborder="0", and scrolling="no". None of these will validate, so therefore I am using JavaScript to set these attributes using the following code:
onload = function() { var theframes = document.getElementsByTagName( 'iframe' ); for( var i = 0; i < theframes.length; i++ ) { theframes[i].setAttribute( "frameborder", "0" ); } for( var i = 0; i < theframes.length; i++ ) { theframes[i].setAttribute( "allowTransparency", "true" ); } for( var i = 0; i < theframes.length; i++ ) { theframes[i].setAttribute( "scrolling", "no" ); } }
I have also tried this:
onload = function() { var theframes = document.getElementsByTagName( 'iframe' ); for( var i = 0; i < theframes.length; i++ ) { theframes[i].setAttribute( "frameborder", "0" ); theframes[i].setAttribute( "allowTransparency", "true" ); theframes[i].setAttribute( "scrolling", "no" ); } }
Both of these only the allowtransparency works. I am still a novice to Javascript and any help would be appreciated. The page using this code can be found here. (Note that this is the 404 error page.) -Cliff
I have also tried this:
Both of these only the allowtransparency works. I am still a novice to Javascript and any help would be appreciated.
The page using this code can be found here. (Note that this is the 404 error page.)
-Cliff
Thanks,
Cliff