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

Re: [ydn-javascript] drop down

Expand Messages
  • Satyam
    The code you show below should not work at all, but I guess you copied it loosely, it really should produce so many errors and warnings that whether the event
    Message 1 of 4 , Oct 27, 2009
    • 0 Attachment
      The code you show below should not work at all, but I guess you copied
      it loosely, it really should produce so many errors and warnings that
      whether the event fires or not should be irrelevant.

      Also, avoid using existing namespaces such as YAHOO.widget.DataTable for
      your own methods, unless there is really a good reason to do so. A
      future version of YUI might declare something for that member and your
      application would then fail.

      You will have to set the event listener for the dropdown change event
      yourself, just as the default formatDropdown method does, the
      dropdownChangeEvent is not fired for any dropdown that might be in the
      table. Click events on any kind of element in the datatable are taken
      care for, but dropdown change events are not reliable across all
      browsers and they don't bubble nicely as do click events, so the
      DataTable cannot centralize its detection. See:

      http://www.quirksmode.org/dom/events/change.html

      Satyam


      bahalul kabir escribió:
      >
      >
      >
      > Hi satyam,
      > I wrote my own formatter but dropdownChangeEvent does not call.
      >
      > YAHOO.widget.DataTable.dropdown = function(elLiner, oRecord, oColumn,
      > oData) {
      > elLiner.innerHTML = <select>
      > <option value=\'support-open\'
      > '.$s_o.'>support-open</option>
      > <option value=\'support-hold\'
      > '.$s_h.'>support-hold</option>
      > <option value=\'support-closed\'
      > '.$s_c.'>support-closed</option>
      >
      > </select>;
      > };
      > {key:"drop",label:"Assign", formatter:YAHOO.widget.DataTable.dropdown}
      >
      >
      >
      > myDataTable.subscribe("dropdownChangeEvent",function (oArgs)
      > {
      > alert("hi");
      > });
      >
      > kabir
      > ------------------------------------------------------------------------
      > *From:* Satyam <satyam@...>
      > *To:* ydn-javascript@yahoogroups.com
      > *Sent:* Tue, October 27, 2009 11:43:45 AM
      > *Subject:* Re: [ydn-javascript] drop down
      >
      >
      >
      > The dropdown will reflect the value contained in the field. If there is
      > no such value coming from the source then you have to either fill it
      > before the table starts to render or go through all the dropdrowns and
      > force the selection or write your own formatter.
      >
      > Satyam
      >
      > bahalul kabir escribió:
      > >
      > >
      > > How can I have selected? for example selected hold.
      > > {key:"assign" , formatter:"dropdown ",
      > > dropdownOptions: ["open"," hold","closed" ],sortable: true},
      > >
      > > Thank you
      > > Kabir
      > >
      > >
      > >
      > >
      > > ------------ --------- --------- --------- --------- --------- -
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - www.avg.com <http://www.avg.com/>
      > > Version: 8.5.423 / Virus Database: 270.14.33/2461 - Release Date:
      > 10/26/09 20:22:00
      > >
      > >
      >
      >
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.423 / Virus Database: 270.14.33/2461 - Release Date: 10/26/09 20:22:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.