Hi Raffles,
I thought I had an idea for doing this - but it doesn't work like I expected.
FF2 gives true then true.
Op9.10 gives true then true.
IE7 gives false then true.
IE6 gives false then true.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Template</title>
<script type='text/javascript'>
var result = false;
window.onload = function()
{
var ele = document.getElementById('d1');
try {
ele.style.position = 'stuff';
result = true;
}
catch (e) {
result = false;
}
alert("ele.style.position = 'stuff'\n\nresult = " + result);
try {
ele.style.position = 'fixed';
result = true;
}
catch (e) {
result = false;
}
alert("ele.style.position = 'fixed'\n\nresult = " + result);
}
</script>
</head>
<body>
<div id='d1'>d1</div>
</body>
</html>
Bookmarks