Dianne Marsh wrote: > The customer wants it to save automatically, so it's not my choice. > > The JSON thing sounds like the ticket. I need to save no matter how > they leave the page. So, it sounds like what I need to do is: > 1. call loadJSONDoc with the arguments of the save function > 2. on the callback, continue on my merry way to whichever page they > were navigating toward (which will mean somehow figuring out HOW they > were attempting to leave the page ... which button, etc). > > Does that sound reasonable? > > I'm LOVING MochiKit's logging facility! > So it's only if the user clicks a LINK on the page that the save has to occur? In that case you could use a technique where each link on the page with the form in it calls a JavaScript function that sets a hidden field in the form to a specific target URL (given as an argument to the function call) and then submits the form (after validation if necessary).
The form processor does what it needs to to save the data, then redirects the browser to the URL in the hidden form field. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

