Loading ...
Sorry, an error occurred while loading the content.

continously tracking mouse location/html table as sortable table

Expand Messages
  • falconair78
    Hi All, I have just started looking at the UI library (and I m new to all this javascript stuff). I have two main questions, hopefully someone can guide me in
    Message 1 of 1 , Apr 3, 2006
    • 0 Attachment
      Hi All,
      I have just started looking at the UI library (and I'm new to all this javascript stuff). I have two
      main questions, hopefully someone can guide me in the right direction:

      1. What is the best way to track the location of the mouse? I would like make an html table
      where as the user's mouse approaches the header rows, little icons associated with various
      operation (sort, hide) appear (their opacity changes). As the mouse moves away from the
      header rows, the icons fade away, leaving just an uncluttred table. I'm sure I'll be using the
      setOpacity method (I can't remember its exact name), but right now the biggest obstacle I see
      is: how do I track the location of the mouse, how do I figure out when the mouse is close
      enough to an element (header rows in my case) for the opacity fade code to kick in, how do I
      link the distance of the cursor to the opacity of the elements? The main point here is how to
      do it without killing performance, obviously changing opacity with each pixel move of the
      cursor is not practical.

      2. As I understand it, sortable table turns the children of a block element into 'orderable'
      elements. So items in a list can be dragged up or down. Does that work inside an html
      table? Can I make <tr> sortable, allowing me to move cells of a row? What if I made the
      header row 'sortable,' there by allowing the user to visually re-order columns in a table? Is
      there a way to move a drag and drop a cell any where within a table, not just its own row
      (something like a spread sheet) ?
    Your message has been successfully submitted and would be delivered to recipients shortly.