Articles in the Javascript Category
Javascript »
This is the practical scenario where sometime one wants to disallow Ctl+keys combinitions on web-pages.
Following Code-snippet tells the whole story:
<html>
<head>
<script language=”JavaScript”>
function testCtrlKeys(e)
{
//Create an array for all possible keys
var arrCtrlKeys = new Array(‘a’, ‘n’, ‘c’, ‘x’, ‘v’, ‘j’);
var key;
var isCtrl;
if(window.event)
{
…
Javascript »
Capturing Mouse Events Using JavaScript :
Sometime there is a need to disable MouseEvents for specific task(s) in Web-Pages.
The following code-snippet shows how to achieve the same :
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
<html>
<head>
<title>Capturing Mouse Events Using JavaScript</title>
</head>
<body>
<div>
<b> Testing with Link Button : </b>
<a href=”javascript:void(null)”
onmousedown=”return captureButton(event)” onmouseup=”return preventOperation(event)”
onclick=”return preventOperation(event)” ondblclick=”return preventOperation(event)”
oncontextmenu=”return preventOperation(event)”
>Click here with various mouse buttons to test</a>
</div>
<br/>
<div>
<b> Testing wuth Submit Button : </b>
<input name=btnG type=submit onmousedown=”return captureButton(event)” onmouseup=”return preventOperation(event)”
onclick=”return preventOperation(event)” ondblclick=”return preventOperation(event)”
oncontextmenu=”return preventOperation(event)”>
</div>
<br/>
<div>
<b> …
Asp.net, Javascript »
My readers enquired that how to rehuffle the yellow page on web.
The Yellow page appears when Web-Site got any runtime error.
I always suggested to supercede the Yellow-Page. Try the following code :
namespace AStepAhead.redirectErrorPage
{
public class redirectErrorPage
{
public redirectErrorPage()
{
String strDomainName = “MsDotnetHeaven.com”;
try
…
