H I O X INDIA
FREE Javascript
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Java Script Source
List All
Date & Time
Calendar
Stop Watch script
Slide Show
Image Effect
Mouse Effects
Color Picker Tool
Dynamic Color
Random Generator
Select All
Form Validation
Textbox Counter
Dynamic Form select
Bookmark
Window / User Info
Security / Authenticate
Status Bar
Title Bar
Cursor Position
Country List
Calculators
Delete Repeated Values
Alphanumeric
Free Games





Browser window Mouse Cursor Position


About
This is a javascript function that will return the current cursor position on the browser window. This java script can be used in any html page.


Features
a) This javascript function will return current mouse cursor position in the browser window.
b) We use two function to do the task. The function init() is used to initialize event handler and capture mouse events in IE (Internet Explorer) and Mozilla (netscape)
c) Function getXY() gets the x and y axis values on cursor position in the browser window size.
d) Just copy the code in to your page and enjoy the effect.


Preview


Code
Code:
<!--        Script by hscripts.com          -->
<!--        copyright of HIOX INDIA         -->
<!-- more scripts @ http://www.hscripts.com -->

<script language=javascript>
window.onload = init;
function init() {
  if (window.Event) {
    document.captureEvents(Event.MOUSEMOVE);
  }
  document.onmousemove = getXY;
}

function getXY(e) {
  x = (window.Event) ? e.pageX : event.clientX;
  y = (window.Event) ? e.pageY : event.clientY;

  document.ee.sd.value = x+":"+y;
}
</script>
<!-- Script by hscripts.com -->
Release Date - 18-07-2005

Get free version without ©copyright link for just 5



Usage
a) Copy the code into your page.
b) Create the HTML with the same form fields.
    <form name=ee>
    <input name=sd type=text>
    </form>
c) The function getXY(e) will be invoked whenever there is a change in cursor positioning.
d) Add your code under the comment to fit your requirement


Related Links
Know how to create simple cursor effects using css




License
- This javascript (misspelled as java script)/HTML code is given under GPL License
- i.e. Free use for those who use it as it is.
- Free, if your modification does not remove our copyright information and links.
- Detailed License information can be found here
- You can purchase the script if your requirements does not meet GPL License terms.


privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Others