1. #1
    Ext User
    Join Date
    May 2008
    Posts
    6
    Vote Rating
    0
    nameroc is on a distinguished road

      0  

    Default 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

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    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.

  3. #3
    Ext User
    Join Date
    May 2008
    Posts
    6
    Vote Rating
    0
    nameroc is on a distinguished road

      0  

    Default


    Thanks for the response, but I'm still confused. Here's the code that errors out:

    Code:
    Ext.Ajax.request({
                    scope : this,
                    url : '/js/ext_components/formlar/' + formName + '.js',
                    success : function(response){                    
                    }
                });
    This is the request that runs. As you can see, the success function is empty and nothing is being done with the response.

    When the url points to a file which contains this:
    Code:
    {json:true}
    It works correctly (as in, no errors in firebug).

    However, when the url points to a file which contains:
    Code:
    json:false
    It gives the
    Code:
     missing ) in parenthetical
    [IMG]chrome://firebug/content/blank.gif[/IMG](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.

  4. #4
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,083
    Vote Rating
    44
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      0  

    Default


    can you show the data you are getting back?
    Teahouse Training Company
    Official Certified Sencha Trainer

    Australia / New Zealand / Singapore / Hong Kong & APAC



    SenchaWorld.com - Sencha webinars, videos, etc
    SenchaForge.org - (coming soon)
    TeahouseHQ.com - Sencha ecosystem training portal

    Code Validation : JSLint | JSONLint | JSONPLint

  5. #5
    Ext User
    Join Date
    May 2008
    Posts
    6
    Vote Rating
    0
    nameroc is on a distinguished road

      0  
    Last edited by nameroc; 30 Apr 2009 at 1:12 AM. Reason: image stretched out the forums too much

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by nameroc View Post
    Thanks for the response, but I'm still confused. Here's the code that errors out:

    Code:
    Ext.Ajax.request({
                    scope : this,
                    url : '/js/ext_components/formlar/' + formName + '.js',
                    success : function(response){                    
                    }
                });
    This is the request that runs. As you can see, the success function is empty and nothing is being done with the response.

    When the url points to a file which contains this:
    Code:
    {json:true}
    It works correctly (as in, no errors in firebug).

    However, when the url points to a file which contains:
    Code:
    json:false
    It gives the
    Code:
     missing ) in parenthetical
    [IMG]chrome://firebug/content/blank.gif[/IMG](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.
    So set a break there!

    See what it's doing, and why, and see who called it, from where by going back through the call stack.

  7. #7
    Ext User
    Join Date
    May 2008
    Posts
    6
    Vote Rating
    0
    nameroc is on a distinguished road

      0  

    Default


    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

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi