Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select lines without the window text being selected

Status
Not open for further replies.

ronsig

Programmer
Joined
May 24, 2001
Messages
54
Location
IL
Hi,

This is a bit tricky, but here goes:

I have code to handel selection of lines in tables by using the SHIFT key (like in the windows explorer). It changes the background color:
...
for (i = 0; i < itemsLength; i++)
{
itemId = ...;
var xt=document.getElementById(itemId);
if( (xt.num/1) >= LastNum && (xt.num/1) <= NewNum)
{
xt.bgColor=&quot;Gold&quot;;
}
}
...

The code is too lonfg to fully describe it.

It works fine, but a side effect is that when the user selects lines like this, in addition to the lines being painted, sections of the screen also get selected (like when you drag the mouse on an HTML page).

Can this be prevented?

10x

Ron

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top