The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

onmouseover & functions

ill try to explain as clear as i can(which might not be too good)

how do you pass an argument to a function.

for example if you have a <span id = "test" onMouseOver ="myfunc(x)>

eg you have lots of differant span id's but you want then all to have a certain background-color with each individual on mouseover event without having to write separate code for each span id
eg <span id=" test2"onmouseover ="this.style.background ='red'>

The second chunk of code should ensure it works in IE4 as well as standards-compliant browsers. You could probably get NS4 to work too, but the code above should at least do enough to stop NS4 complaining, which is good enough IMO.

That just scared the crap out of me! I spent a while trying to do this, and was using a function called changeColours()! In the end I didn't submit it cos I didn't have time, but for a while I was like, er, did I actually submit this!?