[thelist] for loop, array and mouseover teazer
Chris Price
chris.price at choctaw.co.uk
Tue Sep 11 19:32:05 CDT 2007
Sorry, I don't understand what's going on.
I have come up with:
for (i in MyDesc) {
var MyPointer = document.getElementById(i)
MyPointer.onmouseover = function () { MyWorld.nodeValue =
MyDesc[i] + ' world' }
}
}
but its not tackling the issue and I don't understand how the example
below is supposed to work.
I've looked everywhere for enlightenment and found an excellent resource
at simon.incutio.com but this is still a complete mystery to me.
Lee Kowalkowski wrote:
> That gives a closure over count, all functions will reference the same
> instance of count, with its final value.
>
> You can do something like: .onmouseover = new
> Function("changeBall(ball_id_array[" + count + "],ballPark); return
> false;");
>
>
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