Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 26th, 2006, 4:14 AM   #1
pushkarajthorat
Java Developer
 
pushkarajthorat's Avatar
 
Join Date: Jun 2006
Location: Solapur, India.
Posts: 22
Rep Power: 0 pushkarajthorat is an unknown quantity at this point
Send a message via Yahoo to pushkarajthorat
disable 'backspace' key in Javascript.

Hi,

I am working in javascript with (AJAX), i am maintaining states of page in a javascript vars and now i have to disable backspace form javascript.

Thanks in advance.
__________________
[Pushkaraj]


Imagination is more important than knowledge – Albert Einstein
pushkarajthorat is offline   Reply With Quote
Old Dec 26th, 2006, 6:01 AM   #2
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
javascript Syntax (Toggle Plain Text)
  1. window.onkeypress = function(event) { return event.keyCode != 8; }
This binds the onkeypress event to a function that returns false if the keyCode is equal to 8 (which is backspace). Returning false on an event usually (always?) makes the browser ignore any further consequences of the event.
Arevos is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Maverik 6.2 (from C) megamind5005 C 16 May 3rd, 2006 5:41 PM
Hidden unless Javascript enabled? Writlaus JavaScript and Client-Side Browser Scripting 3 Apr 25th, 2006 10:52 PM
Javascript alternative? Writlaus JavaScript and Client-Side Browser Scripting 32 Apr 21st, 2006 12:44 AM
disable "view source" javascript DBZ JavaScript and Client-Side Browser Scripting 19 Apr 16th, 2006 11:23 AM
HTML page not reading external Javascript file aznluvsmc JavaScript and Client-Side Browser Scripting 9 Nov 21st, 2005 9:17 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC