Das Problem besteht grundsätzlich schon, aber ich bin ja schon auf den anderen Tripp ;-)
Ich wollte nur wahsagas Post nicht ignorieren, zumal mich das Thema ja interessiert ;-)
Interessanterweise klappt es jetzt.
HTML-Code:
<html>
<head>
<title>TEST</title>
</head>
<body>
<script type="text/javascript">
var dd_domreadycheck = false;
// Eigentliche FKT zum Aufrufen, wenn READY.
function start() {
alert('ready');
}
domready = function(functionref){ //based on code from the jQuery library
if (dd_domreadycheck){
window[functionref]()
return
}
// Mozilla, Opera and webkit nightlies currently support this event
if (document.addEventListener) {
// Use the handy event callback
document.addEventListener("DOMContentLoaded", function(){
document.removeEventListener("DOMContentLoaded", arguments.callee, false );
window[functionref]();
dd_domreadycheck=true
}, false )
}
else if (document.attachEvent){
// If IE and not an iframe
// continually check to see if the document is ready
if ( document.documentElement.doScroll && window == window.top) (function(){
if (dd_domreadycheck) return
try{
// If IE is used, use the trick by Diego Perini
// http://javascript.nwbox.com/IEContentLoaded/
document.documentElement.doScroll("left")
}catch(error){
setTimeout( arguments.callee, 0)
return;
}
//and execute any waiting functions
window[functionref]();
dd_domreadycheck=true
})();
}
}
domready('start');
</script>
</body>
</html>