switch ( navigator.appName ){default:case 'Microsoft Internet Explorer': browser = 'ie'; break;case "Netscape": browser = 'mz'; break;}........... if ( browser == 'ie' ) { text = document.frames(fname).document.all.item('data').innerHTML; } else { text = document.getElementById(fname).contentDocument.getElementById('data').innerHTML; }
function isErrorContent(iframe) { var content = iframe.contentWindow.document; var error = (content.getElementsByTagName("FORM").length == 0); if (!error) iframe.height = content.getElementById("main").offsetHeight + 20; ... } ... <iframe frameborder="0" scrolling="no" height="*" width="100%" onload="javascript:isErrorContent(this)" src="..."> </iframe>