Category: Internet Explorer
Referer with document.location is broken in Internet Explorer
When you have (this should be discussed anyways) code in your javascript application changing to a different website, you'll see something similar to that:
If you want to retrieve the referer on the next page, this will not work anymore. This is a known IE Bug and not fixed in IE 8.
For instance this in javascript:
And this as test.php
In this case, the output in IE will always be empty. In the other big browsers, it works like a charm.
But there is always, also this time, a workaround. Found at web bugtrack.
If you use for all browsers such wrapper function:
2
3
location.href = url;
}
You just have to make it like that for the one browser:
2
3
4
5
6
var referLink = document.createElement('a');
referLink.href = url;
document.body.appendChild(referLink);
referLink.click();
}
As you can see, it will create a link with exactly the refer link. And will properly work then.
Morph css background-position in Internet Explorer
If you try to set the CSS-property background-position in Internet Explorer (I tested with 7) and even use that with Mootools' morph/tween-functions, it will not work.
You can workaround that issue, if you set also background-position-x and background-position-y (actually ignored by my Firefox 3.0).
This is the code, I use at koala to move the background upwards.
2
3
4
'background-position':'0 -140px',
'background-position-y':'-140px',
});
Could not complete the operation due to error 80020101
This happend to me when I tried to load ajax-content in internet explorer (worked fine in Firefox, etc), which had a script-tag without a valid comments tag.
So just for the record, here is the solution, which helped me.
Before (Broken):
2
3
4
5
<!--
alert('text');
// -->
</script>
Fixed (Working)
2
3
4
5
// <!--
alert('text');
// -->
</script>


