Danilo Luiz Rheinheimer
2007-Aug-31 19:09 UTC
Error on Ajax.Request (this.onStateChange.bind is not a function)
Hi, I open a popup window with this code : window.open("http://server/app/dialogs.jsp?dialog=name&tipo=8", "mywindow", ""); This is my ''dialogs.jsp'' code : <html> <head> <script type="text/javascript" src="js/prototype.js"></script> <script language="JavaScript"> function loaded() { new Ajax.Request(''/app/teste.jsp'', { method:''get'', parameters: {tipo : 8}, asynchronous: false, onSuccess: function(transport) { var json = transport.responseText.evalJSON(); $("cbPeriodoApuracao").setData(json); }, onFailure: function(transport){ showErrorMessage(''teste'', transport); }, onException: function(request, ex){ console.info(request); console.info(ex); } }); } </script> </head> <body onload="loaded()"> <select id="cbPeriodoApuracao" sigeaType="combo" keyName="periodo" labelName="periodo"></select> </body> </html> The problem : on Ajax.Request the method onException is being called sometimes. The message logged by console.info is that : Object transport=XMLHttpRequest options=Objectteste.jsp (line 31) TypeError: this.onStateChange.bind is not a function message=this.onStateChange.bind is not a function I am not able to find why this error happens. And as I say before it happens sometimes, sometimes all is just fine. Any idea of why this happens ? Danilo. ____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---