Pie-rate
03-15-2005, 04:37 PM
I'm writing a Java program (don't run away yet, this IS a javaSCRIPT question) that converts a .java file to a .html file, with syntax coloring. I want it to change the status bar when you mouse over a line to say the line number you've mouseovered.
I've already done this using "<span onmouseover=\"window.status=\'Line: "+n+"\'\">", but you have to mouse over the TEXT on the line, which could cause confusion. For example if you mouse over an empty line it won't change the status bar.
So my question is how do you detect when someone has mouse overed an entire line, not just some text on the line?
I want to keep the size of the html used per line minimal, as a 1000 line bit of code with a 200 character html code on each line is an additional 100kb!!! (about +15sec download on my current connection)
I've already done this using "<span onmouseover=\"window.status=\'Line: "+n+"\'\">", but you have to mouse over the TEXT on the line, which could cause confusion. For example if you mouse over an empty line it won't change the status bar.
So my question is how do you detect when someone has mouse overed an entire line, not just some text on the line?
I want to keep the size of the html used per line minimal, as a 1000 line bit of code with a 200 character html code on each line is an additional 100kb!!! (about +15sec download on my current connection)