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

YUI 2.6 editor validator

Expand Messages
  • ravindra_regunta
    hi guys, I have an inline text box editor on mydata table.The below piece of code validates the data entered.I am displying an alert message when some one
    Message 1 of 1 , Nov 13, 2008
    • 0 Attachment
      hi guys,

      I have an inline text box editor on mydata table.The below piece of
      code validates the data entered.I am displying an alert message when
      some one enters empty string.But the empty string value is getting
      updated on my table.I want to replace the old value or want to show
      the editor with old value.How can i do it.

      myTable.subscribe("editorSaveEvent", function(oArgs) {

      var oEditor = oArgs.editor;
      var oRecord = oEditor.getRecord();
      var phone=oRecord.getData("data");
      ramdom=Math.random();
      if(value != null && value != ''){
      var qry = '<s:url action="accountactivitydt"
      method="updateDevice"/>'+'?data='+data;
      var transaction =
      YAHOO.util.Connect.asyncRequest('POST',qry,callbackUpdateDevices, null);
      }else{
      alert("Can not update empty String");
      reloadTable(offset);
      }

      });
    Your message has been successfully submitted and would be delivered to recipients shortly.