[mochikit] Re: Getting at the deferred from the callback function
On 9/18/06, Juergen Schreck <[EMAIL PROTECTED]> wrote: > > Deferred passes the XHR object to it's callback function. Is there a > way to get a reference to the Deferred in the callback? > No, and you don't want to do that either. If you want additional stuff to be passed to the callback, pass it when you add the callback. It's documented: http://mochikit.com/doc/html/MochiKit/Async.html#fn-deferred.prototype.addcallback -bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Getting at the deferred from the callback function
Deferred passes the XHR object to it's callback function. Is there a way to get a reference to the Deferred in the callback? What I'm trying to do is to transport some vars in the Deferred and use them in the callback. Let's say I wanted to load a specific URL into a part of the DOM. Usually I hard code the DOM element into which to place the results. But what if I wanted to make that more dynamic? E.g. I have: show_detail = function(rec_id) { var url='/admin/'+controller+'/ajax_info/'+rec_id+' var d = doSimpleXMLHttpRequest(url); d.addCallback(function (req) { $('data_preview').innerHTML = req.responseText; // hardcoded to data_preview }); } Assume that I wanted to make data_preview dynamic - e.g. pass it as a parameter to the show_detail function. I was contemplating setting it as a property on the deferred object and then retrieving it in the callback. I suppose, I could also attach it to the req, but I didn't find a way to get at that from the deferred either. Either approach seems a little hacky. There's probably a better way. But I can't see it. Any suggestions? Thanks, Juergen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Safari key signals
On 18-Sep-06, at 8:39 AM, koorb wrote: > It seems that Safari is signalling some onkeydown/up events twice. As > far as I can tell it's arrow keys, function keys and home/end, > numlock, > delete but not keypad numbers. I hope this is a bug that can be > resolved quickly too. > > I have tried to connect to currentWindow(), currentDocument(), > document > and window and they are all behaving the same. I don't think it's my > code as it only happens with certain keys as I said and only in > Safari. Can you please post a minimal example that demonstrates the problem? Thanks, Beau --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Safari key signals
Hello! It seems that Safari is signalling some onkeydown/up events twice. As far as I can tell it's arrow keys, function keys and home/end, numlock, delete but not keypad numbers. I hope this is a bug that can be resolved quickly too. I have tried to connect to currentWindow(), currentDocument(), document and window and they are all behaving the same. I don't think it's my code as it only happens with certain keys as I said and only in Safari. TIA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Back Button
m_waschkowski a écrit : > Well, it seems to me that concept of 'Back Button Support' is pretty > straightforward - you press the back button, and then go to the last > visited page. ie. just what people expect the back button to do. Yes, but the concept of page in an Ajax app is somewhat unclear, because it depends of what you do at each user inputs. Here you can see a good solution: http://www.contentwithstyle.co.uk/Articles/38/. But it's difficult to find a generic solution to this problem. -- Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Back Button
On Sep 18, 2006, at 5:38 AM, m_waschkowski wrote: > Well, it seems to me that concept of 'Back Button Support' is pretty > straightforward - you press the back button, and then go to the last > visited page. ie. just what people expect the back button to do. > > I did see some javascript type solutions, but whatever solution that I > can implement that would allow me to simply recreate the function of > the back button when doing AJAX stuff is what I'm looking for, and > what > I was able to dig up didn't look simple... The "back button" concept goes out the window once you start introducing smaller, asynchronous, sub-page requests. Most solutions I've seen involve modifying the window.location attribute (usually changing hash values), but these solutions are more often for AJAXy navigation than any real "undo". Zac --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Hye Plz Join My New Groups
Hi Dear YAHOO Members, THNX 4 using YAHOO ! Groups I have also started following new groups IF YOU ARE LOOKING FOR JOBS, JOIN OUR FOLLOWING YAHOO/GOOGLE GROUP A2ZHRINFOSERVICES, WE WILL POST JOBS IN YOUR EMAIL http://finance.groups.yahoo.com/group/a2zhrinfoservices/join http://groups.google.com/group/professionalsjobs4u/subscribe IF YOU ARE LOOKING FOR BRIDE GROOMS, JOIN OUR FOLLOWING YAHOO/GOOGLE GROUP net4matrimonialsdotcom, WILL WILL POST NEW PROFILES OF BRIDES/GROOMS WEEKLY http://groups.yahoo.com/group/net4matrimonialsdotcom/join http://groups.google.com/group/yourmatrimony/subscribe Thnx in advance Urs RITU Download free Lovemeter Software from http://groups.yahoo.com/group/lovemeter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Back Button
Well, it seems to me that concept of 'Back Button Support' is pretty straightforward - you press the back button, and then go to the last visited page. ie. just what people expect the back button to do. I did see some javascript type solutions, but whatever solution that I can implement that would allow me to simply recreate the function of the back button when doing AJAX stuff is what I'm looking for, and what I was able to dig up didn't look simple... Thanks, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Back Button
What do you mean by 'back button support' ? There are many ways to support back button in a ajax webapp, so it'd be good if you say what you'd want. Generally MochiKit tries to be not too much intrusive, and I don't see how you can support back buttons without modifying server code. -- Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Errors on Sortable.create
Please post a full reproductible example, it'll be easier to find out what's the problem. Regards, -- Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---