Migrate
12-04-2004, 06:04 AM
Good morning!
I've create a function that listens to onresize events and it works fine in Mozilla, but in IE6 the event in fired three times.
Can anyone tell me how to overcome this problem?
Here is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Resize</title>
</head>
<body>
<script>
var myDiv = document.createElement("div");
myDiv.appendChild(document.createTextNode("Blá Blá"));
myDiv.style.border = "1px dashed Black";
document.body.appendChild(myDiv);
window.onresize = resize;
function resize() {
alert("Resize!!");
}
</script>
</body>
</html>
Thanks in advance,
Migrate
I've create a function that listens to onresize events and it works fine in Mozilla, but in IE6 the event in fired three times.
Can anyone tell me how to overcome this problem?
Here is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Resize</title>
</head>
<body>
<script>
var myDiv = document.createElement("div");
myDiv.appendChild(document.createTextNode("Blá Blá"));
myDiv.style.border = "1px dashed Black";
document.body.appendChild(myDiv);
window.onresize = resize;
function resize() {
alert("Resize!!");
}
</script>
</body>
</html>
Thanks in advance,
Migrate