Why does my code work perfectly on all browsers but IE 8 and 9?

badwolfff
badwolfff used Ask the Experts™
on
Please could someone have a look at this page and tell me where I am going wrong. It is driving me mad!

http://www.absolutproject.com/dominator

This code works on ALL latest browsers including on my iphone and ipad but NOT on IE8 or 9!
Could anyone please suggest a solution or point out the problem to me?

thanks so much
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
hi badwolfff,

Please switch the nesting of anchor tag and list element.:

<a href="javascript:exit('yachtDivName[i]');"><li>...</li></a>

Open in new window


with

<li><a...></a></li>

Open in new window


This causes invalid html. Try and see if that helps.
leakim971Multitechnician
Top Expert 2014

Commented:
Pu this in the first script in your body section instead in head section :

					var yachtDivName 	= 	new Array("d620", "d680", "d720", "d780", "d860", "d29m", "d36m", "d40m");	
					var yachtName 		= 	new Array("620", "680", "720", "780", "860", "29m", "36m", "40m");	
					var yachtFeeling 	= 	new Array("touch", "feel", "love", "seduce", "escape", "dream", "imagine", "desire");

Open in new window

     
Multitechnician
Top Expert 2014
Commented:
try to avoid the use of document.write

use a container (a div for example) and populate  it with HTML elements of yoru choice

https://developer.mozilla.org/fr/DOM/element.appendChild
leakim971Multitechnician
Top Expert 2014

Commented:
all the other function you need inside your body script, put them in the body instead in script in the head section

Author

Commented:
sorry guys my access to this site was blocked due to some subscription issues.
I will try your suggestions out asap and get back to you :)

thanks so much for helping out

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial