Typing Problem

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
calumogg.co.uk
Posts: 5
Joined: Tue Jan 02, 2007 2:08 pm

Typing Problem

Post by calumogg.co.uk »

Script URL: http://calumogg.co.uk/guestbook/gbook.php?a=sign

Hi, I have the latest version of the guestook, and I have changed the odd line here and there but the main code is still the same, but now whenever anyone is typing the the message box if they press backspace to delete a typing mistake it takes them back a page on my site (This only happens in IE not Firefox). Does anyone know what I can do to fix this?
Thanks in advance
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

It's this code in your header:

Code: Select all

function keypress(e) {
	if(!e) var e = window.event;
	if(e.keyCode) keyCode = e.keyCode; 
	else if(e.which) keyCode = e.which;
	switch(keyCode) {
		case 8: window.location="../index.html"; return false; break;
		
		
		case 63273: case 36: window.location="index.html"; return false; break;
		case 63275: case 35: window.location="index.html"; return false; break;
		
	}
	return true;
}
When someone presses the backspace this code will redirect them to index.html.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
calumogg.co.uk
Posts: 5
Joined: Tue Jan 02, 2007 2:08 pm

Post by calumogg.co.uk »

Cheers, got rid of that code and now it works fine! Thanks for a great guestbook.
Post Reply