Originally Posted by
hyperoctave
excellent.. looks very useful..
I did what you suggested and removed unneccesary <html> tags from the sub pages. I agree that this is definitly good practice - double code can't be good..
However, I think I have discovered the source of my problem here. It looks like the swfobject.js is causing IE to cancel viewing the pages. This is pretty crucial, since it is the script for the music player!
Debugging, it says :
Warning 5002 variable "key" already defined
The variable name was already used inside this function.
Warning 5006 exception handling is not supported in some browsers
Internet Explorer 5.0 and later implements exception handling, but Netscape 4.7 and earlier does not.
Warning 5002 variable "axo" already defined
The variable name was already used inside this function.
these errors are duplicated a couple of times, but all refer to line 8 in swfobject.js
A similar error is found (only when debugging in IE - again, firefox is fine) in the fade.js, which is a text effect (hover over red, then fades back to white) - it says :
Warning 5002 variable "i" already defined
The variable name was already used inside this function.
referring to lines 118 and 143.
The annoying thing is that these two scripts have been taken from reputable javascript source websites.
I could remove these scripts from the website, but this would be really detrimental to the design and sound of the site..
Any suggestions?
Did you remove the SWFObject code? Looks like the site is loading in IE6.
What may be happening with the SWFObject is what I mentioned before, the DOM is being manipulated before it has completely loaded, or just after loading.
The correct way to do this would be to have your SWFObject code invoked after the DOM has loaded using the window.onload event.
window.onload = function() {
// place your swfobject code in here..
};
Or you can have multiple event listeners registered for the window.onload function like:
function registerWinOnloadListener(fn) {
if (typeof(window.onload) == 'function') {
var old = window.onload;
window.onload = function() {
fn();
old();
};
} else {
window.onload = fn;
}
}
registerWinOnloadListener(function() {
// first swfobject code
});
registerWinOnloadListener(function() {
//next swfobject code.. etc.
}); www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!