JavaScript
  Home arrow JavaScript arrow OnLoad and OnMouse JavaScript Events
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

OnLoad and OnMouse JavaScript Events
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2007-12-10

    Table of Contents:
  • OnLoad and OnMouse JavaScript Events
  • OnMouse Events
  • OnMouseMove
  • OnMouseOut
  • OnMouseOver
  • OnMouseUp

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    OnLoad and OnMouse JavaScript Events


    (Page 1 of 6 )

    In our last article we left off with the OnKeyUp function, which is triggered when a user releases a key on the keyboard. We will continue discussing the various JavaScript events in this article, and hopefully finish them in the next tutorial. So grab yourself some coffee and let’s get to work.

    But first, let’s preview the beautiful JavaScript Events table again:

     

    Event

    What Triggers the Event

    OnAbort

    Occurs when the loading of an image is interrupted

    OnBlur

    Occurs when an element loses focus

    OnChange

    Occurs when the user changes the content of a field

    OnClick

    Occurs when the user clicks an object

    OnDblClick

    Occurs when the user double clicks an object

    OnError

    Occurs when an error occurs while loading a document or an image

    OnFocus

    Occurs when an element has focus

    OnKeyDown

    Occurs when a keyboard key is pressed

    OnKeyPress

    Occurs when a keyboard key is pressed or held down

    OnKeyUp

    Occurs when a keyboard key is released

    OnLoad

    Occurs when a page or image has completed loading

    OnMouseDown

    Occurs when a mouse button is pressed

    OnMouseMove

    Occurs when the mouse is moved

    OnMouseOut

    Occurs when the mouse is moved off of an element

    OnMouseOver

    Occurs when the mouse is moved over an element

    OnMouseUp

    Occurs when the mouse button is released

    OnReset

    Occurs when the reset button is clicked

    OnResize

    Occurs when a window or frame is resized.

    OnSelect

    Occurs when text is selected

    OnSubmit

    Occurs when the submit button is clicked

    OnUnload

    Occurs when the user exits the page

    OnLoad

    The OnLoad event occurs when either the page or an image is loaded. In the example below, once the page loads we create a pop-up box telling the user that the page has loaded.

    <html>

    <head>

    <script type="text/javascript">

    function pageloads()

    {

    alert ('The page has loaded.')

    }

    </script>

    </head>

    <body onload="pageloads()">

    </body>

    </html>

    Supporting HTML tags: <body>, <frame>, <frameset>, <iframe>, <img>, <link>, <script>

    Supporting Javascript Objects: image, layer, window

    More JavaScript Articles
    More By James Payne


       · Welcome to my article on Javascript Events. In this tutorial we discuss the OnMouse...
     

    JAVASCRIPT ARTICLES

    - Using Click Interceptions with a Database-Dr...
    - Using JavaScript Click Interceptions in an I...
    - Using Click Interceptions with JavaScript
    - QuickSort in Action
    - Quicksort
    - Using Mod_Security to Protect Your Server
    - Detecting and Countering Server Intrusions
    - Securing Your Web Server
    - Building a Secure Web Server
    - Protecting the Server
    - Book Review: Learning the Yahoo! User Interf...
    - Dynamically Generate a Selection List in a R...
    - Intergrate DWR into Your Java Web Application
    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT