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





HTML Element Position


About
This java script function will help you to find the HTML element position in the HTML page. It prints the top and left location of html elements like table, form e.t.c..


Features
a)The javascript function will help you to find the HTML element position.
b)The function says the location of the HTML element present in the web page.
c)Just copy the code in to your page and use it.


Preview
Click anywhere on this page to find element location


Code
Source code: Use ctrl+C to copy the code given below.
<!--        Script by hscripts.com          -->
<!--        copyright of HIOX INDIA         -->
<!-- more scripts @ http://www.hscripts.com -->
<script language="JavaScript">
function showPos(e)
{
    e = (e) ? e : window.event;
    var element = (e.target) ? e.target: e.srcElement;
    var left = element.offsetLeft;
    var top  = element.offsetTop;
    while(element=element.offsetParent)
    {
        left += element.offsetLeft;
        top  += element.offsetTop;
    }
    alert("Left:"+left+"px Top:"+top+"px");
}
document.onclick=showPos;
</script>
<!-- Script by hscripts.com -->
Release Date - 02-01-2007

Get free version without ©copyright link for just 5



Usage
Select the code given above and use ctrl+C to copy the code given above
Use it for free.





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