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

Re: [ydn-javascript] Datatable row appendChild height in IE does not update

Expand Messages
  • Satyam
    Try creating a text node with   Sometime plain whitespace gets ignored so it won t have a height or width.   won t be ignored. Also, avoid setting
    Message 1 of 2 , Jul 29, 2009
    • 0 Attachment
      Try creating a text node with ' ' Sometime plain whitespace gets
      ignored so it won't have a height or width.   won't be ignored.

      Also, avoid setting events on individual elements within the DataTable,
      you can just listen to DataTable's own linkClickEvent and from the
      target argument figure out the originator of the event. Events consume
      quite some memory and it is better if you keep them to a minimum. This
      is called 'event delegation'. Instead of setting lots of separate
      events from the start you set up one and then figure out what triggered
      if and when it is triggered.


      inna_work escribió:
      > Hello,
      > I have a fairly basic Datatable with remote JSON data.
      > One of the cells with a custom formatter is having a problem rendering in IE.
      > What I have:
      > -most of the cells use custom formatter for basic data manipulation
      > -the cell in question has "see more/see less" functionality. All of the data in here is linkable and has events. FF is fine. When rendering in IE on "see more", the data is populated, but the row does not become taller, which is thus incorrect.
      > - data is appended in the 'el' by doing 'appendChild'
      > - tried appending data to el.innerHTML, but since the data is already a DOM note, it does not work.
      > Part of the custom formatter is using "appendChild" to add the "a" elements, and then special events are attached to each element (opening a new container).
      > QUESTION: how can I fix is so that in IE the row gets increased/decreased to proper height when doing "see more" or "see less".
      > snippet of the code:
      > for (var i = 0; i < count; i++) {
      > ip = childrenValue[i];
      > ipWidgetLink = IPWidget.renderIPlink(ip); // returns DOM "a" element
      > el.appendChild(ipWidgetLink);
      > if (i < count - 1) {
      > el.appendChild(document.createTextNode(configObj.searchProps.listsDelim));
      > }
      > else {
      > el.appendChild(document.createTextNode(" "));
      > }
      > IPWidget.initEvents();
      > -----------------------------------------
      > ------------------------------------
      > Yahoo! Groups Links
      > ------------------------------------------------------------------------
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.392 / Virus Database: 270.13.34/2268 - Release Date: 07/28/09 06:00:00
    Your message has been successfully submitted and would be delivered to recipients shortly.