1. #1
    Sencha User mkariti's Avatar
    Join Date
    Aug 2011
    Posts
    92
    Vote Rating
    0
    mkariti is on a distinguished road

      0  

    Default XML Server Response Using Ajax

    XML Server Response Using Ajax


    Hi there,
    Im trying to get an XML response from the server using Ext.Ajax.
    Im able to get the response only if the App is on the server under the same domain.In the API Doc I noticed that inorder to use diff Domains Ill have to use the : Ext.data.ScriptTagProxy. If I need to access the server via the mobile do I need to use this as well or there is another way to get the response from the server?
    I will also would like to wrapp the whole app using Phonegap...

    Many thanks
    mkariti

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Thats correct - to get data from different domain use script tag proxy from client or fetch data on the server

  3. #3
    Sencha User mkariti's Avatar
    Join Date
    Aug 2011
    Posts
    92
    Vote Rating
    0
    mkariti is on a distinguished road

      0  

    Default


    Hi bharatn,
    Many thanks for your confirmation but can you maybe explain how to apply this?
    Here is my code:
    Code:
                  Ext.regModel('Sun', {
                        fields: ['timezone', 'sunset', 'civil', 'Coming_Friday']
                    });
    
                    var store = new Ext.data.Store({
                        model: 'Sun',
                        proxy: {
                            type: 'ajax',
                            url: '',
                            reader: {
                                type: 'xml',
                                record: 'sun'
                            },
                            autoLoad: true
                        }
                    });
    How do I extract the values when using the script tag proxy? Also, what is the tag for? do I need to place it inside the head tag? and what is the callback=someCallback params?
    Code:
    <script src="http://domainB.com/users?callback=someCallback"></script>
    
    Ext.regModel('User', {
        fields: ['id', 'name', 'email']
    });
    
    var store = new Ext.data.Store({
        model: 'User',
        proxy: {
            type: 'scripttag',
            url : 'http://domainB.com/users'
        }
    });
    Many thanks
    mkariti

  4. #4
    Sencha User mkariti's Avatar
    Join Date
    Aug 2011
    Posts
    92
    Vote Rating
    0
    mkariti is on a distinguished road

      0  

    Default


    Hi there,
    Does anyone know how to use the script tag proxy or might have a good exmple of it?
    Im still abit puzzled about how one must use it. Where does the following tag must go and what does it actually does...I get the main Idea and it seems like a nice trick but can you use an XML response with it or just a json one?
    Will appriciate any curmbs of information...

    <script src="http://domainB.com/users?callback=someCallback"></script>Cheers
    mkariti

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    3
    Vote Rating
    0
    leelavathi is on a distinguished road

      0  

    Default


    I too have same probelm.. Dont even have example related to this problm

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    26
    Vote Rating
    0
    gopikumar is on a distinguished road

      0  

    Default


    hi guys,

    even i need an example of scripttag.

    Did u got any solution.

    using scripttag can we access web service that returns xml response.

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