» in my experience...
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elsewhere...
·8bit joystick ·a list apart ·amishrobot ·arcadezen ·antipixel ·boxes and arrows ·black belt jones ·curiousLee ·daring fireball ·design interact ·design not found ·everything hurts ·forwarding address: osx ·gridface ·info design ·izzywizzy ·jon madisons ·joshua kaufman ·k10k ·kalsey ·kelake ·kuro5hin ·the lion's web(log) ·louise ferguson ·memepool ·metafilter ·quinn macdonald ·railhead design ·rentzsch ·surfin' safari ·the onion ·winterspeak ·web-graphics ·xblog ·zen haiku Here at IMX
Recent posts...
·Unreal 2 is... uh, not so great. ·Video Game legitimization. ·Random access info architecture. ·Too soon. ·I want my P2P. ·Detecting alphanumeric characters in JavaScript. ·Having some copyright fun with GarageBand. ·Are five minute compositions worth anything? ·Yeah, GarageBand is cool. ·Taking the plunge (again).
Categorically speaking...
·AOL
·Apple and Mac OSX ·Books and Reading ·Business Technology ·Design ·Design Technology ·Effort ·Gaming ·Information Architecture ·Interaction Design ·Internet Consulting ·JavaScript ·O'Reilly Emerging Tech Conference ·Personal ·Photography ·Random ·Software ·U and I ·UI Programming ·Usability ·User Experience ·Web Browsers ·Weblogs and Blogging ·When Bad Things Happen to Good BMW's Memes R' Us
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cells[] array broken in Safari (?)
[ Posted by Dan on June 26, 2003 | 6 Comments ] Safari reports the length of the cells[] array of a table row as zero, even if it has multiple cells. Look at the table below, if you mouse over it in a Gecko browser, or IE, you will see the background color of the table cells turn color. We do this by placing an onmouseover in the TR tags... <tr onmouseover="color(this)">And that "color" function takes over and says...
function color(obj) {
for (var i=0; i < obj.cells.length; i++) {
obj.cells[i].style.backgroundColor = '#FFFFCC';
}
}
So, onmouseover, the TR object gets passed and the function runs a loop using the length of the TR cells[] array as a stop point. In each iteration of the loop, it sets the backgroundColor to a light yellow and then we use an onmouseout to clean up after it, using almost the same exact function, only with a different name and different color (in this case, light grey, or #CCCCCC).
It's a part of DOM1 and supported back from Nav4 and IE4, so I'm guessing this is an oversight(?) Which isn't to surprising, because this isn't one of those make or break implementations, but it is REALLY useful for helping users track across an HTML table of financial data. [I don't mean to pick on Safari this week, I just happen to be dealing with it a lot and am finding some issues. I'm trying to help out by writing test cases and send them to the mother ship.]
[Update: Safari 1.1 doesn't fix the cells[] array.]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Copyright © 2001 - 2003 by Daniel Kapusta | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||