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

      0  

    Default Ext.form load from cross domain

    Ext.form load from cross domain


    How to set the forms proxy to use ScripTagProxy for loading from another domain.

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

      0  

    Default


    It doesn't use Proxies, it uses Ext.lib.Ajax directly, ie an XHR.

    You'll have to look at the source code, and extend the Ext.form.Action class yourself. You'll enjoy the mental escercise.

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

      0  

    Default


    what are other options to read JSON from another domain in order to manipulate the data.

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

      0  

    Default


    You have to use a ScriptTagProxy. It's not that difficult.

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

      0  

    Default


    Is there a way to use the ScriptTagProxy as a standalone call. Any examples. Can't seem to find one.

    Thx

  6. #6
    Sencha User kubens's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    136
    Vote Rating
    0
    kubens is on a distinguished road

      0  

    Default


    In this conjunction it is important to know, that Ext.data.ScriptTagProxy sends a parameter 'callback' and that you must ensure that this parameter is part of your returned json string:

    Ext.data.HttpProxy
    PHP Code:
    ({"totalCount":"1""demo":[{"id":"1","text":"demo1"}]}) 
    Ext.data.ScriptTagProxy
    PHP Code:
    stcCallback1001({"totalCount":"1""demo":[{"id":"1","text":"demo1"}]}) 
    Br
    Wolfgang

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

      0  

    Default


    Thanks for your input wolfgang as some users may not know that.

    I have used ScriptTagProxy with grid, combobox, tree with Animal's mod but I'm looking to use it with a Form, or as a standalone AJAX call to retreive JSON from another domain for manipulation.

    Thx

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

      0  

    Default


    Do some work then! You have the code I wrote to allow TreeLoader to use a DataProxy. Get on with it!

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

      0  

    Default


    Yes Chief!!

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

      0  

    Default


    Good man!



    I'm a bit crotchety today, not feeling well..

Thread Participants: 3