13 Replies Latest reply on May 29, 2007 11:27 AM by Chris Sweeney

    Force OnChange with selectDate selection

    James Hays Novice

      Just curios, but I'm attempting to add ajax support to my textField that is populated with a date from the SelectDate component. Normally, I would attach an <a4j:support event="onchange"... tag to my textField.

      Since I couldn't find a way to force an onchange event from javascript, I added focus/blur combination to the existing method.

      function __clickCalendar(calName, year, month, day) {
       getObject(calName).value = __calendarFactory.formatDate(year, month + 1, day);
       getObject(calName).focus();
       getObject(calName).blur();
      
      }
      


      This allows me to easily add an <a4j:support event="onblur" component to my textfield and get the desired result.

      If there is a better way, please let me know. Otherwise, I propose we add this to source to gain the a4j support.