Hello, On Nov 3, 12:45 pm, [EMAIL PROTECTED] (Andrew Curry) wrote: > Actually using javascript it is possible although probably not > recommended and again can not be guaranteed to work on all browsers.
even with javascript you can't catch a back-button click as such. You can catch it via the unload-event in many (but not all) browsers, but the same event is triggered by other actions as well, which vary according to browser. Javascript is very limited when it comes to accessing browsers' native controls due to security considerations. This, though, is not a topic for this newsgroup, you might try comp.lang.javascript instead or get acquainted with javascript event basics, i.e. from www.w3schools.com. Perl and other server-side languages can't influence browser behavior directly, perl can only determine and create the documents that get served to the browser after an http-call. > > -----Original Message----- > From: Rob Coops [mailto:[EMAIL PROTECTED] > Sent: 03 November 2008 10:42 > To: [EMAIL PROTECTED] > Subject: Re: Reg : Browser Back Button > > On Mon, Nov 3, 2008 at 11:10 AM, Anusha Krishna chand < > [EMAIL PROTECTED]> wrote: > > > Hi All, > > Is it possible to perform some action when we click on back > button > > of the browser. I need to call a script when i click on back button of > the > > browser using perl script... > > Is there any browser that sends a signal to your server when a user > clicks > the back button? Or is there any client side script that can detect this > for > you? > > The answer to the first question is: No. > The answer to the second question is as far as I am aware: No. > > So that means that the answer to your question is unfortunately: No. > > What you might be able to so is keep track of where the user was last in > the > session, and then on the page that they navigate to take an action based > on > the location they came from, btu that can quite quickly become messy as > a > user might type a URL directly which might mean the new page is not the > previous page but four pages back or a completely different unrelated > page. > > You could also consider that if you need to take an action based on the > back > button then you need to alter your design since this should not be > needed, > looking at al kinds of web tool kits using ajax and other "cool" words. > You > can see many examples of frameworks that manage to handle the back > button > gracefully, even though most web developers will tell you that the back > button is the one thing that all browsers have and that is just as hard > to > code for in every single one of them. > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/