users@woodstock.java.net

Woodstock 4.2M1 async update Javascript error in Internet Explorer

From: autozoom <cioni_mauro_at_yahoo.com>
Date: Thu, 14 Feb 2008 08:23:52 -0800 (PST)

I am trying to update a Woodstock 4.2M1 table using Dynafaces transactions,
but I get a Javascript error using Internet Explorer 6 and 7.
The error says "'null' is null or not an object" and it happens on
re-rendering of the table (I know this because debugging my app I see that
the prerender() method is correctly hit).

When debugging the javascript, error happens in prototype.js file in this
code snippet:

respondToReadyState: function(readyState) {
    var event = Ajax.Request.Events[readyState];
    var transport = this.transport, json = this.evalJSON();

    if (event == 'Complete') {
      try {
        (this.options['on' + this.transport.status]
         || this.options['on' + (this.responseIsSuccess() ? 'Success' :
'Failure')]
         || Prototype.emptyFunction)(transport, json);
      } catch (e) {
        this.dispatchException(e);
      }

      if ((this.header('Content-type') || '').match(/^text\/javascript/i))
        this.evalResponse();
    }

    try {
      (this.options['on' + event] || Prototype.emptyFunction)(transport,
json);
      Ajax.Responders.dispatch('on' + event, this, transport, json);
    } catch (e) {
      this.dispatchException(e);
    }

    /* Avoid memory leak in MSIE: clean up the oncomplete event handler */
    if (event == 'Complete')
      this.transport.onreadystatechange = Prototype.emptyFunction;
  },

  dispatchException: function(exception) {
    (this.options.onException || Prototype.emptyFunction)(this, exception);
    Ajax.Responders.dispatch('onException', this, exception);
  }
});

actually the "json" variable is "undefined" because the call to
this.evalJSON() returns nothing.

Everything is working perfectly using Firefox.

Any ideas or hints about a possible workaround?

thanks

Mauro
-- 
View this message in context: http://www.nabble.com/Woodstock-4.2M1-async-update-Javascript-error-in-Internet-Explorer-tp15481262p15481262.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.