Hi, If the user clicks the back button, the page currently showing will receive the unload event, so:
Event.observe(window, 'unload', yourFunctionHere); If you're trying to support the forward and back buttons (and bookmarking) in a single-page style web application, there's a lot more to it than that, though, and Prototype doesn't currently provide a complete history solution. The usual way to do that is to play games with the anchor (hash) portion of the URL, but there are a *lot* of browser-specific workarounds involved. For intranet projects, I've used Really Simple History[1] for this (it's compatible with Prototype) with good results. Unfortunately, that project hasn't seen an actual update in years, but it works quite well in IE6, IE7, and Firefox to my knowledge (haven't tried IE8 yet...hmmm, I should go do that). At one stage there was an issue with it not working on Chrome which I believe was a Chrome issue, but that may have been resolved. I *think* it works correctly with Safari. (The Chrome problem wasn't in WebKit.) [1] http://code.google.com/p/reallysimplehistory/ HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com [1] http://code.google.com/p/reallysimplehistory/ On Mar 3, 6:10 am, "Medisetti Rajesh(Dora Babu)" <[email protected]> wrote: > hi friends, > > Is there any way to capture the BACk BUTTON event in IE? > You help is most appreciated. > pls help me.. > > -- > Thanks & Regards > Medisetti Rajesh > Ph : 09930798770 > > "Satyameva Jayathey--Truth Alone Triumphs" -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en.
