SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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!

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please clarify your question. What are trying to accomplish? Is it a "click and drag" script?

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi twodogs,

    Have a look at this demo: Click-n-Drag Checkboxes

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Man...that's professional!! Perfect, thanks.

  6. #6
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  7. #7
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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:

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

    But how do I get the Id for the row?

    Code JavaScript:
    this.CheckboxObj.style.backgroundColor = color1;
    only highlights the checkbox.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •