Just guessing from a quick glance try:
myAjax.transport.responseText -Andrew Martinez -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Matthew Williams Sent: Tuesday, February 06, 2007 10:48 AM To: Ruby on Rails: Spinoffs Subject: [Rails-spinoffs] Displaying AJAX.Request object contents? I'm using a class I found that evals responseText from AJAX.Requests, judging by my Firebug results it works like a charm, however, I'm having difficulty displaying the data in a DIV. Code: <script> Ajax.Eval = Class.create(); Object.extend(Object.extend(Ajax.Eval.prototype, Ajax.Request.prototype), { initialize: function(url, pars) { this.transport = Ajax.getTransport(); this.setOptions({method:'post', parameters:pars}); this.options.onComplete = (function(transport) { eval(transport.responseText); }); this.request(url); } }); function runAjax(target) { var myAjax = new Ajax.Eval('getlrudetail.cfm?id=30020', {method:'get'}); $(target).innerHTML = myAjax.responseText; // Returns "Undefined" in my DIV space. } </script> I'm pretty new to JavaScript in general but I'm working on an internal AJAX app (which is working wonderfully, but it's a big hack so I'm trying to go about re-developing the proper way). I think the code is pretty self-explainatory, I just need a way to display the responseText from the call. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
