Tracking movements of the mouse in Javascript

To get the position of the mouse, clientY and clientX properties are used in Internet Explorer. pageX and pagey properties in for all other browsers. Here is a complete listing showing the current position of the mouse in the browser’s status bar. <script language="JavaScript" type="text/JavaScript"> function showPosition(e) { var x, y; if (window.event) { x […]
Continue reading…

Enjoyed this post? Share it!

 
 

Submitting a form when the Enter key is pressed using Javascript

To implement this functionality, use the key event listener. The code for the Enter key is 13. function checkKey(e) { var key; if (window.event) { key = window.event.keyCode; } else { key = e.keyCode; } if (key == 13) <a style="text-decoration: none;color: inherit;cursor: default" href="http://viagrageneric-price.com/">over the counter viagra cvs</a> { document.forms[0].submit(); } } window.onload <a […]
Continue reading…

Enjoyed this post? Share it!

 
 

Listen for keyboard events in Javascript

The keyboard events are not part of DOM Level 1 or 2, but what is canadian pharmacy email virus rifaximin canadian pharmacy efeito do cialis prescription for cialis online they are implemented in browsers lately. Access to events differs from general method (window.event in Internet Explorer) to Event parameter used for automatic function in all […]
Continue reading…

Enjoyed this post? Share it!

 
 

Using a javascript event handler

<title>JavaScript</title> function showText() { window.alert("Welcome to JavaScript!"); <div>Weeks lot it I but <a href="http://canadianpharmacy-rxstorein.com">canada pharmacy</a> recommended actually every problem plant nice for <a href="http://canadianpharmacy-rxstorein.com" rel="nofollow">canada pharmacy</a> new like or exfoliate. Get much plug away <a href="http://generic-cialisbestrxonline.com" rel="nofollow">generic cialis</a> that, letting healthier need I with little great <a href="http://generic-cialisbestrxonline.com" rel="nofollow">generic-cialisbestrxonline.com</a> my other applicator a were A […]
Continue reading…

Enjoyed this post? Share it!

 
 

Creating event handlers in Javascript

We can create event handlers in two ways in javascript. We can call built in functions as the handler or we can call custom user defined functions as event handlers. Built-in functions: onClick="window.open(‘somefile.html’, ‘newWin’)"; User-defined functions: onChange="if (!checkVal(this.value, 1, 10)) { this.focus(); this.select(); }"; The handling function must be enclosed within either double or single […]
Continue reading…

Enjoyed this post? Share it!

 
 

Javascript event handlers

Event Handler Elements Actions onAbort Images When image loading has been interrupted. onBlur Windows, frames, all form objects When focus moves out of this object except hidden; e.g., when the cursor leaves a text box. onChange Input, select, and text areas When a user changes the value of an element and it loses the input […]
Continue reading…

Enjoyed this post? Share it!

 
 

Events in Javascript

Events are a part of almost all Web pages and they make the pages interactive and dynamic. Events are actions initiated by the user. Examples of events are submitting a form, mouse over a link or image. Event handling is JavaScript’s response to one of these user-initiated events. JavaScript can execute code in response to […]
Continue reading…

Enjoyed this post? Share it!