The document.layers part won't work, but that is rarely used. Not since NN4, I believe. The rest will work.
See:
http://www.quirksmode.org/js/layerwrite.html
Added Later:
This seems to also work out fairly well:
Code:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function Something(ID) {
var text='whatever', d=document.layers||document.all||null;
var x=d? d[ID] : document.getElementById? document.getElementById(ID) : null;
if (document.getElementById)
x.innerHTML = '';
if (document.layers){
x.document.open();
x.document.write(text);
x.document.close();
}
else if(x)
x.innerHTML = text;
return false;
}
</script>
</head>
<body>
<div>
<div id="blah"><layer name="blah"></layer><br></div>
<a href="#" onclick="return Something('blah');">test</a>
</div>
</body>
</html>
Bookmarks