Go Back   SitePoint Forums > Forum Index > Program Your Site > JavaScript
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Mar 12, 2007, 04:00   #1
twodogs
SitePoint Zealot
 
Join Date: Mar 2005
Posts: 141
Mouse down then mouseover

Is it possible to combine these two events so that the onmouseover event doesn't occur until the onmousedown event occurs and then the onmouseover finishes when the onMouseout event occurs? Excuse all the mice!
twodogs is offline   Reply With Quote
Old Mar 12, 2007, 06:12   #2
MikeFoster
I'll take mine raw
silver trophy
 
MikeFoster's Avatar
 
Join Date: Dec 2002
Location: Alabama, USA
Posts: 2,562
Please clarify your question. What are trying to accomplish? Is it a "click and drag" script?
__________________
Cross-Browser.com, Home of the X Library
MikeFoster is offline   Reply With Quote
Old Mar 12, 2007, 12:17   #3
twodogs
SitePoint Zealot
 
Join Date: Mar 2005
Posts: 141
I have series of checkboxes in a table that are selected when the table cell is clicked. I would like to be able to do this by clicking on the first cell then dragging the cursor over the next cells rather than having to click on each one. I can do it by using onmouseover but that is not selective enough.
twodogs is offline   Reply With Quote
Old Mar 12, 2007, 17:10   #4
MikeFoster
I'll take mine raw
silver trophy
 
MikeFoster's Avatar
 
Join Date: Dec 2002
Location: Alabama, USA
Posts: 2,562
Hi twodogs,

Have a look at this demo: Click-n-Drag Checkboxes
__________________
Cross-Browser.com, Home of the X Library
MikeFoster is offline   Reply With Quote
Old Mar 12, 2007, 19:44   #5
twodogs
SitePoint Zealot
 
Join Date: Mar 2005
Posts: 141
Man...that's professional!! Perfect, thanks.
twodogs is offline   Reply With Quote
Old Mar 12, 2007, 23:41   #6
MikeFoster
I'll take mine raw
silver trophy
 
MikeFoster's Avatar
 
Join Date: Dec 2002
Location: Alabama, USA
Posts: 2,562
__________________
Cross-Browser.com, Home of the X Library
MikeFoster is offline   Reply With Quote
Old Sep 24, 2007, 00:55   #7
waving
SitePoint Member
 
Join Date: Sep 2007
Posts: 3
This is exactly what I was looking for. Great javascript

I've been playing around with your code trying to highlight de row but with no luck . I can highlight a row with:

JavaScript Code:
color1 = 'ffffcc';
document.getElementById('row1').style.backgroundColor = color1;

But how do I get the Id for the row?

JavaScript Code:
this.CheckboxObj.style.backgroundColor = color1;
only highlights the checkbox.
waving is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

 
Forum Jump


All times are GMT -7. The time now is 05:41.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved