Sorry Victor it did not work, i had below in js file..

Form.YooEventObserver = Class.create(Abstract.EventObserver, { 
  minQueryLength: 3,
  
  getValue: function() {
    // return YAHOO.util.Connect.setForm(this.element);
    //return Form.serialize(this.element);
  },
  
  registerFormCallbacks: function() {
    Event.observe(this.element, 'reset', this.onFormResetEvent.bind(this));
    Form.getElements(this.element).each(this.registerCallback.bind(this));
  },
  
  formResetAction: function() {
    var value = this.getValue();
    // calling again so that serialization is correct
    value = this.getValue();
    this.lastValue = value;
    this.lastCallbackValue = value;
    this.callback(this, value + '&reset=true');
  },
  
  onFormResetEvent: function(){
    // Delaying so that serialization is correct
    setTimeout(this.formResetAction.bind(this), 10)
    //this.formResetAction.bind(this)
  },
  
  onElementEvent: function() {
    var value = this.getValue();
    if (this.lastValue != value) {
      this.callback(this.element, value);
      this.lastValue = value;
    }
  },
  
  onTextElementEvent: function(el) {
    var value = this.getValue();
    if (this.lastValue != value) {
      if ( 
        ((el.getValue() || '').length + 1 > this.minQueryLength  || 
(el.getValue() || '').length === 0 ) && 
        value != this.lastCallbackValue
      ){
        this.callback(this.element, value);
        this.lastCallbackValue = value;
      }
      this.lastValue = value;
    };
  },
  
  registerCallback: function(element) {
    this.lastCallbackValue = this.getValue();
    if (element.type) {
      switch (element.type.toLowerCase()) {
        case 'checkbox':
        case 'radio':
          Event.observe(element, 'click', this.onElementEvent.bind(this));
          Event.observe(element, 'change', this.onElementEvent.bind(this));
          break;
        case 'text':
        case 'textbox':
        case 'textarea':
          new Form.Element.Observer(element, 0.22, 
this.onTextElementEvent.bind(this, element));
          break;
        case 'hidden':
          new Form.Element.Observer(element, 0.10, 
this.onElementEvent.bind(this));
          break;
        default:
          Event.observe(element, 'change', this.onElementEvent.bind(this));
          break;
      }
    }
  }
  
});

and i got this error while refreshing chrome window.


   1. Uncaught Error: ExecJS::ProgramError: Unexpected token: operator (*) 
   (line: 9987, col: 4, pos: 392034) Error at new JS_Parse_Error 
   (<eval>:1720:22) at js_error (<eval>:1728:15) at croak (<eval>:2189:17) at 
   token_error (<eval>:2196:17) at unexpected (<eval>:2202:17) at 
   <eval>:2580:17 at maybe_unary (<eval>:2665:27) at expr_ops (<eval>:2692:32) 
   at maybe_conditional (<eval>:2696:28) at maybe_assign (<eval>:2720:28) (in 
   /Users/mac/yoopedia/dev/app/assets/javascripts/preload.js) 
   /assets/preload.js:1 <http://yoopedia.dev/assets/preload.js>


   1. Uncaught ReferenceError: Form is not defined 
yoo:361<http://yoopedia.dev/mainpage/yoo#_=_>


   1. Uncaught ReferenceError: Form is not defined 
yoo:549<http://yoopedia.dev/mainpage/yoo#_=_>


   1. Uncaught ReferenceError: gY is not defined 
yoo:860<http://yoopedia.dev/mainpage/yoo#_=_>


   1. Uncaught ReferenceError: YAHOO is not defined 
postload.js:7<http://yoopedia.dev/assets/postload.js>


   1. Uncaught ReferenceError: YAHOO is not defined 
yoo:1019<http://yoopedia.dev/mainpage/yoo#_=_>


   1. Uncaught ReferenceError: YAHOO is not defined 


On Thursday, August 9, 2012 3:06:41 PM UTC+5:30, Victor wrote:
>
> Form.YooEventObserver = Class.create({Abstract.EventObserver, {
>   minQueryLength: 3,
>   
>   getValue: function() {
>     // return YAHOO.util.Connect.setForm(this.element);
>     //return Form.serialize(this.element);
>   },
>
>   // ... other methods
> });
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/QvlQ5RJbasEJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to