[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Is there reference for the javascript event handler arguments?

Posted on 2015-02-11
6
Medium Priority
?
101 Views
Last Modified: 2015-03-09
Hi Experts,

I am playing with HTML5 and javascript. I can find a very complete list of events in HTML5 elements (http://www.w3schools.com/tags/ref_eventattributes.asp). However, when I try to find out what these events can do, I found that it should be helpful if I have reference documents for the event handler arguments.

For example, if doMouseDown(event) function is the event handler of the mouse-down event of an element, then the event parameter should have pageX and pageY properties accessible in the handler.

Is there such a reference document? Where can I get it?
Thank you!
0
Comment
Question by:huangs3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 9

Accepted Solution

by:
Brian Tao earned 2000 total points
ID: 40604842
0
 

Author Comment

by:huangs3
ID: 40606317
Hi Brian,

In this link I can see the names of the events, but how do I know the accessible properties of the event argument?
For example, I can find that there is an "onmousedown" event, but how can I efficiently find out the event handler argument (let's say it is named "arg") has properties arg.pageX and arg.pageY returning the mouse coordinates?

Thank you!
0
 
LVL 9

Expert Comment

by:Brian Tao
ID: 40607727
The upper part of the page is like what you said, and events are categorized under sections.
In the lower part of the page, there are other sections for event methods and properties (which you called event arguments). They are with subjects "Event Object", "MouseEvent Object", "KeyboardEvent Object", ... and so on

All event handlers are passed with one argument, the event object.  With the argument (usually we put it as an "e", e.g. doMouseDown(e) using your example) you can get e.altKey, e.button, e.clientX, e.clientY, ... etc.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:huangs3
ID: 40654999
Brian's link doesn't show all the event object properties, but with the provided keyword "Event Object" I could find more references, such as:
http://www.javascriptkit.com/domref/domevent.shtml
http://www.javascriptkit.com/jsref/event.shtml
https://developer.mozilla.org/en/docs/Web/API/Event

Thank you!
0
 

Author Closing Comment

by:huangs3
ID: 40655003
sorry for the late response due to some perturbation on my side
0
 
LVL 9

Expert Comment

by:Brian Tao
ID: 40655211
Thanks for the points.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question