Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Odd page behaviour


Message #1 by "Berry, Thomas" <TBerry@V...> on Thu, 2 May 2002 16:31:58 -0400
For IE I added 'readonly  onkeydown="doKeyCheck(event)"' to the Textarea 
and in Javascript added:

function doKeyCheck(evt) {
	window.event.keyCode = null;
}// fn

document.onkeypress = doKeyCheck;


For Netscape & others onfocus="blur()" for the Textarea does the trick. 
Just make sure this code is NOT used for IE!

> Hey,

You're correct, it seems that some browsers use the backspace button
to trigger the back-button of the browser, unfortunately there is not =
much
one can do about this unless you know some big-shot at Microsoft.

Another way, might be to try to disable the back-functionality of your=20
browser using JavaScript.

Greetings,

Bart Laeremans

-----Original Message-----
From: Tom Berry [mailto:tberry@v...]
Sent: dinsdag 7 mei 2002 15:34
To: Pro_JavaServer_Pages
Subject: [pro_jsp] Re: Odd page behaviour


See the Web Design: HTML for answer.

> I am having a strange problem with the "Backspace" key. My web app=20
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. The page is a JSP and the text is placed there by a basic
scriptlet. 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=20
page
reverts to the last page loaded. There is no communications attempt with =

the
webserver.

Has anyone encountered this before?

Thank you
Tom Berry

---
Change your mail options at http://p2p.wrox.com/manager.asp or=20
to unsubscribe send a blank email to 

  Return to Index