lookin for a javascript DOM guru...
Hi all,
Just a quick question. I have a table with many rows in it. I have currently implemented a simple rollover script to change the background color of the row when I rollover it:
... onmouseover='this.className="some classname" '
and a corresponding onmouseout call as well. basically just changing stylesheets on the fly
So, I have many many rows of data, and am running up into a problem with load times.
basically, i would love to just write a small jscript function to change the background color for me, cutting down on quite a bit of data.
however, i ma having problems effectively passing the current element to a jscript function correctly...
none of my rows have ID's assigned to them at the moment
Is there a simple way to pass a reference to a DOM object to a jscript function without using an id?
for instance, this doesnt work, but is more of what i am looking for:
onmouseover='myFunction(this)'
and then:
myFunction(var){
var.className="some_new_Class";
}
i hope i havent made a mess of trying to explain myself....
|