struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eickvonder Bjoern" <Eickvonder.Bjo...@inside-online.de>
Subject AW: Disabling Back Button in IE
Date Wed, 22 Feb 2006 16:09:28 GMT
Just add

document.onkeydown	   = function(e) {
	if (document.all) {
		if (event.srcElement.type=="text" || event.srcElement.type=="textarea") return true;
		else return false;
	}
	else {
		if (e.target.type=="text" || e.target.type=="textarea") return true;
		else return false;
	}
}	    
document.onkeypress	   = function(e) {
	if (document.all) {
		if (event.srcElement.type=="text" || event.srcElement.type=="textarea") return true;
		else return false;
	}
	else {
		if (e.target.type=="text" || e.target.type=="textarea") return true;
		else return false;
	}
}	  

to your page and all keys pressing has no effect, except for text and textarea fields. So
the only way 
still to get back ist pressing ALT-Leftarrow within a text or text area. You might catch this
as well
but exactly catching a specific key is more complicated especially as firefox and ie behaviour
differs in
that case.

Bjoern 

> -----Ursprüngliche Nachricht-----
> Von: Josh McDonald [mailto:josh.mcdonald@workcoverqld.com.au] 
> Gesendet: Mittwoch, 22. Februar 2006 06:42
> An: user@struts.apache.org
> Betreff: Re: Disabling Back Button in IE
> 
> Can't (and shouldn't) be done. The closest you're likely to 
> get it open your app in a popup window with no menu, though 
> the user can still hit backspace. A better idea is to fix the 
> (assumed) re-post issues in your application.
>  
> -Josh
>  
> -- 
>  
> "His comrades fought beside him, Van Owen and the rest...
>        But of all the thompson gunners- Roland was the best."
>  
> Josh McDonald
> Analyst Programmer
> Information Technology
> Ph: 61 7 3006 6460
> Email: josh.mcdonald@workcoverqld.com.au
> 
> 
> >>> vasumathi@koensoft.com 22/02/2006 3:19:22 pm >>>
> 
> 
> 
> Hi
> Anyone can tell how to disable the "Back" button in IE 
> through our Code.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 
> 
> 
> 
> **************************************************************
> *************
> Messages included in this e-mail and any of its attachments 
> are those of the author unless specifically stated to 
> represent WorkCover Queensland. The contents of this message 
> are to be used for the intended purpose only and are to be 
> kept confidential at all times.
> This message may contain privileged information directed only 
> to the intended addressee/s. Accidental receipt of this 
> information should be deleted promptly and the sender notified.
> This e-mail has been scanned by Sophos for known viruses.
> However, no warranty nor liability is implied in this respect.
> **************************************************************
> **************
> 
> 

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie
nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail bzw. Inhalte hieraus ist nicht gestattet.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message