[thelist] More frustration with dom and IE
Chris Price
chris.price at choctaw.co.uk
Fri Aug 24 05:34:50 CDT 2007
Another case where Firefox and Opera play ball but IE won't have it.
What I have is a base image.
I then have 6 divs absolutely positioned so that when the mouse hovers
over one of them it changes the base image.
It works fine in Firefox but won't play in IE. Any ideas?
<snip>
window.onload = initElement
function initElement() {
var ball0,ball1,ball2,ball3,ball4,ball5,ball6;
ball0 = document.getElementById('ball_image')
ball1 = document.getElementById('ball1')
ball2 = document.getElementById('ball2')
ball3 = document.getElementById('ball3')
ball4 = document.getElementById('ball4')
ball5 = document.getElementById('ball5')
ball6 = document.getElementById('ball6')
ball1.onmouseover = function() { changeBall('6ball1',ball0);
return false }
ball2.onmouseover = function() { changeBall('6ball2',ball0);
return false }
ball3.onmouseover = function() { changeBall('6ball3',ball0);
return false }
ball4.onmouseover = function() { changeBall('6ball4',ball0);
return false }
ball5.onmouseover = function() { changeBall('6ball5',ball0);
return false }
ball6.onmouseover = function() { changeBall('6ball6',ball0);
return false }
ball1.onmouseout = function() { restoreBall(ball0); return false }
ball2.onmouseout = function() { restoreBall(ball0); return false }
ball3.onmouseout = function() { restoreBall(ball0); return false }
ball4.onmouseout = function() { restoreBall(ball0); return false }
ball5.onmouseout = function() { restoreBall(ball0); return false }
ball6.onmouseout = function() { restoreBall(ball0); return false }
}
function changeBall(myBall,masterBall) {
masterBall.src = '6ball/' + myBall + '.jpg'
}
function restoreBall(masterBall) {
masterBall.src = '6ball/6ball0.jpg'
}
</snip>
Kind Regards
--
Chris Price
Choctaw
chris.price at choctaw.co.uk
http://www.choctaw.co.uk
Tel. 01524 825 245
Mob. 0777 451 4488
Beauty is in the Eye of the Beholder
while Excellence is in the Hand of the Professional
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+- Sent on behalf of Choctaw Media Ltd -+-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Choctaw Media Limited is a company
registered in England and Wales
with company number 04627649
Registered Office:
Lonsdale Partners,
Priory Close,
St Mary's Gate,
Lancaster LA1 1XB
United Kingdom
More information about the thelist
mailing list