-
29 Apr 2009 10:57 PM #1
Ext.Ajax.request Problem
Ext.Ajax.request Problem
Hi,
I've recently switched to Ext 3 RC 1, and I'm having some issues with Ext.Ajax.request. When I request a file which contains anything BUT JSON formatted data (regular html files, files which contain a <div>, files which contain simple javascript functions), it gives an 'missing (in parenthetical' error in firebug and the request does not complete. This used to work in the previous version of Ext JS.
I want to request non-json formatted files for my project using Ext.Ajax.request or some other method if that is possible.
Thanks in advance for any insights or ideas,
nameroc
-
29 Apr 2009 11:54 PM #2
You are passing the result to eval() which is throwing this error.
Debug by seting a breakpoint in Ext's Ajax postprocessing, and stepping through until you see where the error is.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
30 Apr 2009 12:43 AM #3
Thanks for the response, but I'm still confused. Here's the code that errors out:
This is the request that runs. As you can see, the success function is empty and nothing is being done with the response.Code:Ext.Ajax.request({ scope : this, url : '/js/ext_components/formlar/' + formName + '.js', success : function(response){ } });
When the url points to a file which contains this:
It works correctly (as in, no errors in firebug).Code:{json:true}
However, when the url points to a file which contains:
It gives theCode:json:false
error in ext-all-debug.js, line 7570. The line does indeed contain eval(), but I don't get why it's trying to evaluate the result at all.Code:missing ) in parenthetical [IMG]chrome://firebug/content/blank.gif[/IMG](json:false)
-
30 Apr 2009 1:04 AM #4Sencha - Sales Team
- Join Date
- Mar 2007
- Location
- Melbourne, Australia (aka GMT+10)
- Posts
- 753
- Vote Rating
- 6
can you show the data you are getting back?
Sencha Technical Sales & Senior Technical Trainer
Sencha Inc
Register with discount code "ASA357" and save $100

The new SenchaWorld.com is coming in July, more details closer to SenchaCon
Code Validation : JSLint | JSONLint | JSONPLint
-
30 Apr 2009 1:12 AM #5
Last edited by nameroc; 30 Apr 2009 at 1:12 AM. Reason: image stretched out the forums too much
-
30 Apr 2009 1:13 AM #6
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
30 Apr 2009 1:28 AM #7
The error was in my code after all: A catch all requestcomplete that was written ages ago, and I'd forgotten about it.
Thanks for all the help,
nameroc


Reply With Quote



