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

Re: YUI tooltip problem

Expand Messages
  • daisyhmazie
    Thanks! Thought so but didnt actually know. -Donna ... the ... is not ... to be ... could ... position. ... basic ... anywhere. ... is made ... after ... until
    Message 1 of 7 , Oct 30, 2008
      Thanks!
      Thought so but didnt actually know.
      -Donna
      --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
      >
      > They are aliases of one another, there is no difference.
      >
      > daisyhmazie wrote:
      > > Thanks to both of you!
      > > I tried the renderEvent but could not get it to execute. I did
      > > however discover the cellMouseOverEvents and successfully made that
      > > work. I know this is a newbie question, but what is the difference
      > > between datatable.subscribe() and datatable.on()? Because I used
      > > datatable.subscribe.
      > > Thanks!
      > > -D
      > >
      > > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
      > >
      > >> I wasn't reading this thread since I don't really know much about
      the
      > >> Tooltip so I couldn't say much. However I felt somewhat wrong about
      > >> creating too many Tooltips on a page. Setting up each individual
      > >> tooltip and all those listeners takes too much memory. Moreover, as
      > >> these users have found, keeping them in synch with the DataTable
      is not
      > >> easy. You have to wait for the table to be drawn and then, if the
      > >> records are sorted, the hooks of each cell with its tooltip has
      to be
      > >> refreshed otherwise the tooltips will either show in their former
      > >> positions or with the text for the previous content of the cell, I'm
      > >>
      > > not
      > >
      > >> sure which one. Plus, all the trouble of disposing of all the old
      > >> Tooltips, unless you don't mind wasting memory.
      > >>
      > >> So I did a little example:
      > >>
      > >> http://satyam.com.ar/yui/2.6.0/tooltips.html
      > >>
      > >> It has only one ToolTip control for the whole table. Actually, I
      could
      > >> have used a panel if it wasn't for the style. I set a timer for
      > >> DataTable's cellMouseoverEvent and after half a second I show the
      > >> panel. Before doing so I read the value that will become the
      > >>
      > > content of
      > >
      > >> the tooltip and I position the panel slightly off the cursor
      position.
      > >> If the cellMouseoutEvent happens before the timer is out, the
      > >>
      > > timeout is
      > >
      > >> cancelled, the tooltip won't show, if the tooltip is visible, it
      > >>
      > > will be
      > >
      > >> hidden. Once a tooltip is shown, it will remain visible until the
      > >> cursor is moved or 5 seconds pass.
      > >>
      > >> The content of the tooltip is taken from a field read along the
      basic
      > >> data for the DataTable which is not shown. It may come from
      anywhere.
      > >> The table can be sorted and the tooltip will show fine since it
      is made
      > >> on the fly from whatever the cell contains at that point.
      > >>
      > >> Also notice everything is initialized right from the start since,
      after
      > >> all, if there is no data on the table, there is nothing you can put
      > >>
      > > your
      > >
      > >> cursor on, actually, the tbody that will hold the data is hidden
      until
      > >> populated so the cellMouseoverEvent cannot be triggered until the
      data
      > >> is shown.
      > >>
      > >> Satyam
      > >>
      > >>
      > >>
      > >>
      > >> Satyen Desai wrote:
      > >>
      > >>> Hi Donna,
      > >>>
      > >>> Try setting up the tooltip in a DataTable renderEvent or
      > >>>
      > > postRenderEvent listener.
      > >
      > >>> It seems like you're trying to setup the Tooltip before the TD
      > >>>
      > > cells for the data have been rendered (as with another thread
      > > regarding tooltips and DataTables I responded to yesterday).
      > >
      > >>> Regards,
      > >>> Satyen
      > >>>
      > >>> p.s. Jenny/Satyam - feel free to correct me if there's a more
      > >>>
      > > appropriate event to listen for.
      > >
      > >>> ________________________________________
      > >>> From: ydn-javascript@yahoogroups.com
      > >>>
      > > [mailto:ydn-javascript@yahoogroups.com] On Behalf Of daisyhmazie
      > >
      > >>> Sent: Tuesday, October 28, 2008 12:53 PM
      > >>> To: ydn-javascript@yahoogroups.com
      > >>> Subject: [ydn-javascript] YUI tooltip problem
      > >>>
      > >>> Im having a problem with tooltip and specifically it seems to happen
      > >>> only when I get my data dynamically returning as TYPE_JSON.
      > >>> It seems that using YAHOO.util.Dom.getElementsByClassName
      > >>> will not find the DOM tag with that classname if I also specifically
      > >>> tell it to find the TD tag. *If* I only put the classname but
      not the
      > >>> tag, it will find the classname for the column header and add one
      > >>> tooltip over the column header.
      > >>> I know this is a problem in my code with the datatable being created
      > >>> with JSON dynamic data because when I hardcode a JSARRAY in
      there and
      > >>> use the exact same code all is fine.
      > >>>
      > >>> Pls help!
      > >>> TIA
      > >>> Donna
      > >>>
      > >>>
      > >>> ------------------------------------
      > >>>
      > >>> Yahoo! Groups Links
      > >>>
      > >>>
      > >>>
      > >>>
      > >>>
      > >
      ------------------------------------------------------------------------
      > >
      > >>> No virus found in this incoming message.
      > >>> Checked by AVG - http://www.avg.com
      > >>> Version: 8.0.175 / Virus Database: 270.8.4/1752 - Release Date:
      > >>>
      > > 28/10/2008 10:04
      > >
      > >>>
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      ------------------------------------------------------------------------
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - http://www.avg.com
      > > Version: 8.0.175 / Virus Database: 270.8.4/1754 - Release Date:
      29/10/2008 7:45
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.