Dann mach ich wohl was falsch oder stell mich wieder zu dumm an
Hier mal nochmal der komplette Code
Hier mal nochmal der komplette Code
Code:
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>title</title>
<script type="text/javascript">
(function() {
var original_title,
title = document.getElementsByTagName( "title" )[ 0 ];
interval = null;
window.addEventListener( "focus", function() {
if ( interval != null ) {
window.clearInterval( interval );
title.innerHTML = original_title;
}
}, true );
var new_message_notification = function ( notification_message ) {
if ( interval != null ) {
window.clearInterval( interval );
title.innerHTML = original_title;
}
original_title = title.innerHTML;
interval = setInterval(function() {
if ( title.innerHTML == original_title ) {
title.innerHTML = notification_message;
} else {
title.innerHTML = original_title;
}
}, 1000 );
};
window.new_message_notification = new_message_notification;
})();
</script>
</head>
<body><?php
echo "<meta http-equiv='refresh' content='5; URL=test.php'>";?>
</body>
</html>