1. #11
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Sorry for my English.

    I understand.

    I try to change by easy way this code:

    Code:
           script.setAttribute("type", "text/javascript");
    for this:

    Code:
            script.setAttribute("type", "text/xml");
    I have no errors, but "handleresponse" never fires.

    Is posible by changes in your override code, proccesing the two most popular types of reponses in client? (JSON and XML). Now only processing JSON?

    I think that your override should be included in future versions of Ext. The cross-domain request are in the top of actual web applicattions.

    Thanks in advance,

  2. #12
    Ext User
    Join Date
    Apr 2007
    Posts
    131
    Vote Rating
    0
    MoShAn480 is on a distinguished road

      0  

    Default


    Im trying to use the override too. I am able to run the example just fine, but when i run my own application code i get the following error in fireBug which says invalidLabel? Anyone have any ideas? Thanks!

  3. #13
    Sencha - Community Support Team JeffHowden's Avatar
    Join Date
    Mar 2007
    Location
    Forest Grove, OR
    Posts
    1,038
    Vote Rating
    1
    JeffHowden is on a distinguished road

      0  

    Default


    What does your response look like?
    Jeff Howden
    Ext JS - Support Team Volunteer
    jeff@extjs.com

    Any and all code samples that are authored by me and posted on the Ext forums or website are hereby released into the public domain and I release anyone or entity of liability by using said code samples unless explicitly stated otherwise.

    Opinions are mine and not necessarily endorsed by Ext, LLC. Please do not contact me directly for assistance unless requested by me.

  4. #14
    Ext User
    Join Date
    Apr 2007
    Posts
    131
    Vote Rating
    0
    MoShAn480 is on a distinguished road

      0  

    Default


    Here is my response:

    [IMG]chrome://firebug/content/blank.gif[/IMG]{"status":"success","connectionId":"6F2A9B03326B26DC"}


    Also, I missed this earlier, but i guess my response has to be wrapped in a callback function. If this is the case, it seems i have to set this up on the server so my response should be:

    myCallBack ('{"status":"success","connectionId":"6F2A9B03326B26DC"}')

    This ok when i have control of the server response, but about the case where I am accessing data from a server whihc is out of my control. Please correct me if I'm not understanding this correctly. Thanks.

  5. #15
    Ext User
    Join Date
    Apr 2007
    Posts
    131
    Vote Rating
    0
    MoShAn480 is on a distinguished road

      0  

    Default


    oops my original response string was:

    {"status":"success","connectionId":"6F2A9B03326B26 DC"}

    Thanks...

  6. #16
    Ext User
    Join Date
    Mar 2007
    Posts
    170
    Vote Rating
    0
    gkassyou is on a distinguished road

      0  

    Default


    Animal. Will this work with the 1.1.1 release?

    Thx

  7. #17
    Sencha - Community Support Team JeffHowden's Avatar
    Join Date
    Mar 2007
    Location
    Forest Grove, OR
    Posts
    1,038
    Vote Rating
    1
    JeffHowden is on a distinguished road

      0  

    Default


    Quote Originally Posted by MoShAn480 View Post
    Also, I missed this earlier, but i guess my response has to be wrapped in a callback function. If this is the case, it seems i have to set this up on the server so my response should be:

    Code:
    myCallBack ('{"status":"success","connectionId":"6F2A9B03326B26DC"}');
    That's correct. A callback is absolutely necessary. The reason is that you're just dynamically including a JavaScript file and without the response wrapped with a function call there's no way for the response to get injected back into whatever it is you need to have it in. Additionally, without it being wrapped in a callback, the response (whether pure JSON or XML) will cause errors as it's invalid JavaScript on its own.

    Quote Originally Posted by MoShAn480 View Post
    This ok when i have control of the server response, but about the case where I am accessing data from a server whihc is out of my control.
    If the server response is out of your control, often there are means for instructing the server (by the parameters sent to it) to include a callback. In some cases you can specify the name of the callback function. In others, the callback is not adjustable and you must indicate in your request parameters what the name of the callback will be so Ext can setup a function by that name that's waiting to be called. In situations where there's no means for the server to include a callback, you'll have to proxy the request from your server to their server and back.
    Jeff Howden
    Ext JS - Support Team Volunteer
    jeff@extjs.com

    Any and all code samples that are authored by me and posted on the Ext forums or website are hereby released into the public domain and I release anyone or entity of liability by using said code samples unless explicitly stated otherwise.

    Opinions are mine and not necessarily endorsed by Ext, LLC. Please do not contact me directly for assistance unless requested by me.

  8. #18
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by galdaka View Post
    Sorry for my English.

    I understand.

    I try to change by easy way this code:

    Code:
           script.setAttribute("type", "text/javascript");
    for this:

    Code:
            script.setAttribute("type", "text/xml");
    I have no errors, but "handleresponse" never fires.

    Is posible by changes in your override code, proccesing the two most popular types of reponses in client? (JSON and XML). Now only processing JSON?

    I think that your override should be included in future versions of Ext. The cross-domain request are in the top of actual web applicattions.

    Thanks in advance,
    Any ideas about only client-side solution for XML request?

    Thanks in advance,

  9. #19
    Ext User
    Join Date
    Nov 2007
    Posts
    68
    Vote Rating
    0
    markpele is an unknown quantity at this point

      0  

    Default


    I`m using Animal`s override and able to get the callback from the server.

    Can I use script tag the same as normal AJAX calls in the sense that I can make two asynch requests?

    I`m creating two connections objects con1 and con2.
    Requests are being sent as a result of user actions.
    There could be a state where both con1 and con2 are running so before I`m making a request I`m doing a check:
    Code:
    if(!con1.isLoading()) {
    	con = con1;
    	console.log('con1');
    	return true;
    }
    else if(!con2.isLoading()) {
    	con = con2;
    	console.log('con2');
    	return true;
    }
    else return false;
    It takes 30 seconds for my server to respond so I can easily control things.
    When looking at firebug console and sending requests with a delay time < 30 second I get:
    Code:
    con1
    con1
    con1
    ...
    Instead of:
    Code:
    con1
    con2
    con1
    con2
    ...
    Is there a problem with isLoading() with this override or maybe I`m not allowed to use it?
    I tried the same with normal AJAX calls and I get the expected behaviour.

    Is timeout the only error exception I can get when using script tag?

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

      0  

    Default


    This works.

    The server MUST respond by calling the specified callback to get the data "into" Ext.

    Here is what I am hoping (probably somewhat pretentiously) will become a "reference implementation" of Ext with cross-domain Ajax. It's a Flickr control Panel.

    It's not finished, but try it as far as it goes. It's commented, so you should be able to see what it does. It unzips into examples/<whatever>

    flickr.zip


film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar