Tag Archives: webdesign

How to disable key board short keys in a web page using javascript

In this Article, I’ll explain how to disable some of the Keyboard short key(s) using JavaScript. In the same way you could disable almost any key in a web page

Mainly, the solution is to use key codes for each key in a keyboard.

for e.g.,

Key code for F5  is 116

Key code for backspace is 8

Don’t worry I will tell you how you can find the key code for various keys in a key board at the end !!

also you can make use of event object like event.ctrlKeyto check if ctrlKey has been pressed

Now Let’s the see the code

You would also want backspace key to work when its placed/focused in a textbox or textarea html elements in a webpage and want to disable only when its outside of those elements. Code for this is

Now, Let’s see how we can find a Key codes for all keys in a keyboard

w3c has built a web page which helps in looking up “Key and Character Codes vs. Event Types”

The below screenshot shows when a key is pressed how the various key code, event details are populated ! This page is very handy

Now block the keys and rock the web

All the Best !!!

Participation in Business Transactions ( SOAP 1.1 Vs 1.2 )

by Kuldip Bajwa

Distributed systems pose reliability problems that are not frequently encountered in centralized systems. A distributed system consisting of a number of computers connected by a network can be subject to independent failure of any of its components, such as the computers themselves, network links, operating
systems, or individual applications. Decentralization allows parts of the system to fail while other parts remain functioning, which leads to the possibility of abnormal behaviour of executing applications.

  Consider the case of a distributed system where the individual computers provide a selection of useful services that can be utilized by an application. It is natural that an application that uses a collection of these
services requires that they behave consistently, even in the presence of failures. A very simple consistency requirement is that of failure atomicity: the application either terminates normally, producing the intended results, or is aborted, producing no results at all. This failure atomicity property is supported by atomic transactions, which have the following familiar ACID properties:

  1. Atomicity: The transaction completes successfully (commits) or if it fails (aborts) all of its effects are undone (rolled back);
  2. Consistency: Transactions produce consistent results and preserve application specific invariants;
  3. Isolation: Intermediate states produced while a transaction is executing are not visible to other transactions. Furthermore, transactions appear to execute serially, even if they are actually executed concurrently. This is typically achieved by locking resources for the duration of the transaction so that they cannot be acquired in a conflicting manner by another transaction
  4. Durability: The effects of a committed transaction are never lost (except by a catastrophic failure).

  A transaction can be terminated in two ways: committed or aborted (rolled back). When a transaction is committed, all changes made within it are made durable (forced onto stable storage such as disk). When a transaction is aborted, all changes made during the lifetime of the transaction are undone. In addition, it is possible to nest atomic transactions, where the effects of a nested action are provisional upon the commit/abort of the outermost (top-level) atomic transaction.