Todd, no disagreement on leaving the back button to users but at the present time we needed a quick fix beings our site went live two days ago and it averages roughly 50,000 hits per day. We will work on a better solution next month but for now this might do the trick
<html> <body onload="handleBackButton()"> <form name="_mine"> <input name="_a1" value="1" style="visibility:hidden"> </form> <script language="JavaScript"> var x="1"; var isBack; function handleBackButton() { isBack = (x != document._mine._a1.value); document._mine._a1.value=2; document._mine._a1.defaultValue=2; } function isBackButtonUsed() { return isBack; } </script> <h1>Back button testing</h1> <form> <input type=button value="is back button" onclick="(isBackButtonUsed())? alert('Back button was used'):alert('Page was loaded normally')"> </form> </body> </html> -----Original Message----- From: Todd Baker [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 1:52 PM To: [EMAIL PROTECTED] Subject: Re: [WSG] Need direction with key detection I think you'll find that ... A: You can't detect that. B: Its best left in the users hands. The back button is the lifeline of many users. Sometimes its the ONLY click that they know EXACTLY where they will go. To do anything with script would be a usability disaster. I think you need to re-architect your system and solve the problem another way. I have had the same problem when building checkout systems and the like and there is ALWAYS a way to solve these problems. On Thu, 18 Nov 2004 11:01:02 -0800, GALLAGHER Kevin S <[EMAIL PROTECTED]> wrote: > We built http://www.ormap.org which is a GIS site. Our problem occurs when a > user clicks the "Back" button. > > What I am looking for is code to detect when the "Back" button is clicked > (Alt+> is another problem). Any ideas or sites to direct me too. ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ****************************************************** ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************