User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 426,422 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,345 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Problems with browser compatibility.. especially internet explorer

Join Date: Sep 2005
Posts: 689
Reputation: digital-ether has a spectacular aura about digital-ether has a spectacular aura about 
Rep Power: 6
Solved Threads: 41
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Practically a Master Poster

Help Re: Problems with browser compatibility.. especially internet explorer

  #7  
Mar 21st, 2008
Originally Posted by hyperoctave View Post
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!
Reply With Quote  
All times are GMT -4. The time now is 2:09 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC