1. #1
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    454
    Vote Rating
    6
    mysticav is on a distinguished road

      0  

    Default about Ext-yui XHR utility

    about Ext-yui XHR utility


    I would like to know if ext-yui provides an XHR utility similar to:
    http://ajaxtoolbox.com/

    basically it works like this:

    Ajax.makeRemoteCall(mydataObj, remoteurl, callback);

    function callback(response){
    .... do whatever yo want with response
    }

  2. #2
    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


    Sure, look in the docs for the UpdateManager class.
    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.

  3. #3
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    454
    Vote Rating
    6
    mysticav is on a distinguished road

      0  

    Default


    Well it doesn't look clear form me:

    Code:
    // Get it from a Ext.Element object
    var el = Ext.get("foo");
    var mgr = el.getUpdateManager();
    mgr.update("http://myserver.com/index.php", "param1=1&param2=2");
    ...
    mgr.formUpdate("myFormId", "http://myserver.com/index.php");
    How can I just make the call and get the response without involving elements at all?

    Or even better, how can you adapt this approach using yui-ext:

    Code:
    Ajax.makeRemoteCall(mydataObj, remoteurl, callback); 
    
    function callback(response){ 
    .... do whatever yo want with response 
    }

  4. #4
    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


    If you're not looking to update an element, then you'll probably want to look into Ext.lib.Ajax.request() or Ext.lib.Ajax.formRequest() if you're working with form data.
    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.

  5. #5
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    454
    Vote Rating
    6
    mysticav is on a distinguished road

      0  

    Default


    Thanks, but can you point me where can I read info. about this object ?
    Using Ext with cachefly
    Working on LAMPExt

  6. #6
    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


    There are no docs at this point. So, you'll need to look directly in /src/experimental/yui-bridge.js
    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.

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

      0  

    Default


    You can also use Ext.data.Connection. See my AjaxForm class for an example (update and submit functions).
    Belgabor's Ext Playground - Showcase for my Extensions

  8. #8
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    454
    Vote Rating
    6
    mysticav is on a distinguished road

      0  

    Default


    Yes. it works as expected. Just have a question:
    In the following code, I would like to know about the 'method' parameter.


    Code:
    var conn = new Ext.data.Connection({
    
                method: finalMethod,
                url: finalUrl
            });
    Also I need to know if its possible to make cross ajax calls (normally is not allowed).

    Thanks.
    Using Ext with cachefly
    Working on LAMPExt

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    Connection determines whether to do GET or POST based on whether you pass parms to the request. In addition, you can pass method:'GET' or method:'POST' to override that behavior. Read the source to see the implications of GET vs POST.

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