CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Back button causing havoc

 



microwebber
Novice

May 26, 2002, 9:33 AM

Post #1 of 4 (485 views)
Back button causing havoc Can't Post

Angelic The back button on the browser is causisng havoc on my script. How can I determine if the user has pushed the back button from the browser? Is their a CGI method for this? yorkeylady@earthlink.net
Thanks
Tricia
yourkeylady@earthlink.net


fashimpaur
User / Moderator

May 29, 2002, 5:19 AM

Post #2 of 4 (479 views)
Re: [microwebber] Back button causing havoc [In reply to] Can't Post

Microwebber,

Your web page that is providing the form data may need to have a javascript
that checks to see if the user hit a backspace key when the type of form element was not a text input type (input or textarea). This was messing up a CGI
application I had and fixed the problem. To see what I mean, go to any web
site. Then go to www.google.com and click the cursor on any part of the screen
that is not the search input box or a button or a link. Then hit your backspace
key. It should take you back to the last website you were at. This is default
functionality in Internet Explorer. I am not sure if the same problem exists in
other web browsers. To fix this, write a keypress event handler that cancels the
event bubble in IE if the button was a backspace key and the form input type
was not a textarea or input.

Good Luck,
Dennis

$a="c323745335d3221214b364d545".
"a362532582521254c3640504c3729".
"2f493759214b3635554c3040606a0",
print unpack"u*",pack "h*",$a,"\n\n";


microwebber
Novice

May 29, 2002, 6:54 AM

Post #3 of 4 (474 views)
Re: [fashimpaur] Back button causing havoc [In reply to] Can't Post

Is the backspace key equivalent to the back button on the browser?
Thanks
Tricia
yourkeylady@earthlink.net


fashimpaur
User / Moderator

May 29, 2002, 7:02 AM

Post #4 of 4 (474 views)
Re: [microwebber] Back button causing havoc [In reply to] Can't Post

No. The Back button is equivalent to a History.back event. The Backspace key,
when the cursor is not in a text type input box, sends a History.back event to the browser. The only way to stop the use of the back button is to intially open your application in a new browser window with none of the menus displayed. This, in
conjunction with the capture of the Backspace keypress (oops and also the Alt +
<left arrow key>) will eliminate all instances of the History.back event. It really
is a pain in the neck to stop.

Good luck,
Dennis

$a="c323745335d3221214b364d545".
"a362532582521254c3640504c3729".
"2f493759214b3635554c3040606a0",
print unpack"u*",pack "h*",$a,"\n\n";

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives