I would like to have such code in ItemsListEditor (used by net.leftweb.mapper.view.TableEditor). What's the best way to add the script? Should I return from the snippet boundXhtml ++ <head><script ... ?
------------------------------------- Timothy Perrett<[email protected]> wrote: Try: window.onbeforeunload = function(evt){ var reply= "You have unsaved changes!"; if(typeof evt == 'undefined'){ evt = window.event; } if(evt){ evt.returnValue = reply; } return reply; } Cheers, Tim On 2 Feb 2010, at 18:31, Naftoli Gugenheim wrote: > Hi, in Lift how would one implement functionality similar to in Gmail, that > when you try to navigate away from an unsaved email you get a dialog box > asking to confirm? > > -- > You received this message because you are subscribed to the Google Groups > "Lift" 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/liftweb?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Lift" 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/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" 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/liftweb?hl=en.
