html_code_clinic thread: Strange behavious when "Backspace" pressed.
Thanks for the info. I found that no matter what the page, if there is no
focus to an object, Backspace acts like the Back button in IE (those
Microsoft guys, what'll they come up with next).
Since this a MS only "feature", I can still use onfocus="blur()" to
disable editing a Textarea in Netscape and Opera. For IE, before the page
is returned to the client, I add:
readonly onkeydown="doKeyCheck(event)"
to the Textarea tag. The Javascript code is:
function doKeyCheck(evt) {
window.event.keyCode = null;
}// fn
This resolves my problem - just be sure NOT to place onfocus="blur()" for
IE.
Tom
>
The backspace key is a hotkey to go to the previous web page.(IE)
When the object you have focus is disabled it reverts to it's standard
function.
It uses the clients cache to loade that page so the server would not
show any activity.
I do not think HTML is the problem.
I do not know how to get around this default action.
Would be interested in how to do this.
Hope this helps,
Brian
-----Original Message-----
From: Berry, Thomas [mailto:TBerry@V...]
Sent: Thursday, May 02, 2002 4:30 PM
To: HTML Code Clinic
Subject: [html_code_clinic] Strange behavious when "Backspace" pressed.
I am having a strange problem with the "Backspace" key. My web app presents
a list of comments. When a user selects a comment, they are presented a
textarea which is either blank, or filled with a previously entered
response. When the response may not be changed, I set "disabled" in the
Textarea. I have found that when the Textarea is disabled and the Backspace
key (NOT the Delete key), is pressed, the web page reverts to the previous
page loaded.
I checked if the page was being submitted back to the webserver BUT NO
activity occurs on the server-side, so the problem seems to be with the
HTML.
I next changed the Textarea to a Table with one cell where the Textarea
would have been with the disabled text and repeated the test - And it still
happens!
I finally stopped the webserver, repeated the steps and IMMEDIATELY the
page
reverts to the last page loaded. There is no communications attempt with
the
webserver.
Has anyone encountered this before?
Thank you
Tom Berry