ISPrincess
Programmer
Here is the background:
I have a datagrid in which i am programming client side events to enable multi-select or at least multi-highlighting.
Server side I added these 2 events in the Row_Databound event of the grid:
The Code for the MouseOver event checks the value of a hidden input: txtIsMouseDown.
In the HTML I have a onMouseDown event which sets this txtIsMouseDown value=1 and I also have a onMouseUp event which sets txtISMouseDown value=0.
In the javascript for the MouseOver Event, I check the value of this, and if it is 1, thereby giving the behavior of highlighting multiple rows as the user holds the mouse key down and mouse-overs.
This all works great until I access and click on the IE scroll bar on the right side of the page. This event must be setting txtIsMouseDown value=1 but never triggers the onMouseUp. If i click somewhere on my page the value is set back to 0 and all is well again.
Does anyone have any ideas on 1. what i may be doing wrong or 2. how to capture the fact that the user clicked on the right scroll bar?
I am a newbie, so please add some code sample if you have any suggestions.
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips
I have a datagrid in which i am programming client side events to enable multi-select or at least multi-highlighting.
Server side I added these 2 events in the Row_Databound event of the grid:
Code:
e.Item.Attributes.Add("OnClick", "HighlightRow( this );")
e.Item.Attributes.Add("OnMouseOver", "HighlightRowMouse( this );")
The Code for the MouseOver event checks the value of a hidden input: txtIsMouseDown.
In the HTML I have a onMouseDown event which sets this txtIsMouseDown value=1 and I also have a onMouseUp event which sets txtISMouseDown value=0.
Code:
function CatchMouseKey(field, evt)
{
document.Form1.txtIsMouseDown.value=1;
}
function ClearMouseKey(field, evt)
{
document.Form1.txtIsMouseDown.value=0;
}
In the javascript for the MouseOver Event, I check the value of this, and if it is 1, thereby giving the behavior of highlighting multiple rows as the user holds the mouse key down and mouse-overs.
This all works great until I access and click on the IE scroll bar on the right side of the page. This event must be setting txtIsMouseDown value=1 but never triggers the onMouseUp. If i click somewhere on my page the value is set back to 0 and all is well again.
Does anyone have any ideas on 1. what i may be doing wrong or 2. how to capture the fact that the user clicked on the right scroll bar?
I am a newbie, so please add some code sample if you have any suggestions.
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips