This worked great for passing a form to a url and getting back results and calling a callback function.

But I notice that doSimpleXMLHttpRequest( ) can not take a string in place of arguments. So, I wonder, is there another function I can use so I can pass a url and a string to do something like this:

function myReq( u, f ) {                           //u == url, f == form
           var str = queryString( f );
           str += "&gmap_id=" + bMapID;
//            doSimpleXMLHttpRequest( u, f ).addCallback( dostuff );
//            sendXMLHttpRequest( ?, str ).addCallback( dostuff );
}

thanks

<Jerub> oh hey, you just don't understand Deferred yet.
<Jerub> it's quite simple.
<Jerub> just do a doSimpleXMLHttpRequest(..).addCallback(callmewhenyouaredone); <Jerub> where callmewhenyouaredone is along the lines of: function callme(response) { ... }
<Jerub> and do define a function to handle errors, you just do:
<Jerub> doSimpleXMLHttpRequest(..).addBoth(callmewhenyouaredone, callmeonerror);


Reply via email to