X And Y Coordinates

Jul 23, 2005

How can I find out (using JavaScript) the x and y coordinates of a HTML
element, e.g. an image, an anchor, a div?

View 5 Replies


ADVERTISEMENT

Coordinates - Draw A Line Between To Different Coordinates Which Are Going On Google Maps

Apr 2, 2010

i have to draw a line between to different coordinates which are going on google maps so for example :

[Code]...

the above coordinates are in xml format which, i later call in Java script functions and display them on the map as a simple pointers what i need is from one point of coordinates to another point of coordinates Java script would draw a line which would represent the direction from one coordinate to other .

View 2 Replies View Related

Getting True X Y Coordinates From Both IE And FF?

Feb 14, 2011

I am trying to get the X and Y coordinates to have a pop up form to use as reference, this is a shopping cart so the more items in the cart the further down the page the form needs to open,

i have this CSS:

Code:

#theFormDiv6 {
display:none;
position:absolute;
top:500px;

[Code]....

I am not real good at JS and I am trying to piece together things.

This works in IE but does not in Firefox, when I comment out the getMouseXY() call it works in firefox but obviously doesnt get the new Y value..

anyone know how to make this work in both IE and Firefox??

View 2 Replies View Related

How To Set Mouse Coordinates?

Nov 30, 2005

How can I get mouse coordinates and set them?
mean: When I click button1, my mouse places over button2.

View 1 Replies View Related

I Want To Get ISMAP Coordinates

Mar 6, 2005

I'm trying to build a simple image-map-creation tool for a web-based app I'm making. (User selects an image, then clicks on it to set image map areas; initially could be just RECTANGLE, later want CIRCLE and POLYGON.)

The quickest "solution" was to display the image with anchor tags, with the ISMAP option on. This causes the x/y coordinates to be displayed in the status bar, at the end of the URL. Sweet, but I'd like to be able to tell when the user clicks, and then grab those values. Then I can build a text string holding their selected area, etc. (It'd be great if I could show the selected area with a box or something, too, but that may require doing it in PHP, building images, etc.) Anyway, does anyone know how I can get the X/Y coordinates when the user clicks? Since it's in a form, can I do something with input types to get the values?

View 2 Replies View Related

Find Coordinates

Jun 8, 2005

how to find the coodinates for a picture in a middle of the page for example with js? I need this because i have a js script that get the mouse coodinates (X,Y) for the page.I have to modify this script to work only at my picture area and to get me the coordinates for my picture not the coordinates for my hole page. Code:

View 5 Replies View Related

Get The Coordinates Of A Pictures?

Oct 20, 2010

do ya know an efficient way to get the coordinates of a pictures so that I can use them to create a map? It is a rectangle. Here is the code I set up for a page:

<HTML>
<HEAD>
<TITLE>Cyrus</TITLE>
</HEAD>
<BODY BGCOLOR=black>
<div align="center">
<table border="0"; cellspacing="0"; cellpadding="0">
[Code]..

View 26 Replies View Related

XY Coordinates When Zooming

Jul 11, 2010

I've got a image zoomer set up using a script located in shiftzoom.js. Basically, the XY coordinates of the mouse are shown in the bottom left of the image as the mouse moves. However, when I am zoomed right out the coordinates are limited to that of the image 'canvas' size (1024,768) and as soon as I zoom in, the coordinates of the mouse (which is in the same place) change until I am fully zoomed in and the coordinates are limited to the original image resolution in the corners. Hope that made sense... This is the relevant code in shiftzoom.js:

[Code]...

View 1 Replies View Related

Take Coordinates Form Image

Nov 23, 2005

I have a simple problem: mark a list of defects
on an image.

I think the best way to do it is to select a single
deffect, then take two coordinates of coursor
form an image on a web page (first when user press
the button, and the second when he releases it).
Those two points are going to be send to the web
application (i.e. with AJAX) and saved in a database.
Later, I will use those points to render
the image with RMagic (drawing the lines and defects
list numbers on top of the image).

Any suggestions how to do it?

View 4 Replies View Related

Distance And Angle Between 2 Xy Coordinates

Jun 15, 2006

how would i get the distance and angle between 2 points on the screen.
For example:

what is the distance between (100,50) and (250,70)

what i really wanna do is see how far the current mouse position is
from a given object and what the angle is between them.

View 8 Replies View Related

How To Get Clicked Point Coordinates?

Jun 25, 2007

<form action="..." method="post">
<input type=image name="Image1"
src="..."/>
</form>

When I click on the image the form submitted to the server. As I can
see post data contains next additional values: Image1.x=121 and
Image1.y=64 These values are coordinates of clicked point relative to
image.

Can I get these values in onclick event handler (within the
beforeSubmit method)?

View 4 Replies View Related

Css Coordinates Pulled In From Array

Apr 30, 2011

I have a grid 500 by 500 with 16 squares each 125 by 125. I can shuffle these images manually by setting the background-position in css. if the position is 0px, -125px how can I store those in an array and pull them in randomly? here is my code:

<html>
<head>
<title>shuffle tiles</title>
<script type="text/javascript">
function shuffle(){
//?????
}
[Code]...

View 4 Replies View Related

Strings - Get The Coordinates From A Variable In The URL

Oct 2, 2011

I have this code for HMTL5 Canvas, however this is a JavaScript directed question not a Canvas question.

<script type="text/javascript">
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.moveTo(0,400);
cxt.lineTo(50,a);
cxt.lineTo(100,b);
cxt.lineTo(150,390);
[Code]...

That will draw a line graph, however I want to get the coordinates from a variable in the URL. So it may be example.com/a=500&b=600 . How would I retrieve these two variables and then insert in to they're respective places?

View 5 Replies View Related

Get XY Coordinates Of Mouse Clicked

Jun 22, 2011

i'm trying to get the XY coordinates of a clicked mouse

here is my code :

if(event.pageX)
alert(event.pageX);
else if(event.clientX)
alert(event.clientX);

[Code]....

View 12 Replies View Related

Get The The Coordinates X,y Of A Mouse Click?

Jan 5, 2012

how to to get the the coordinates x,y of a mouse click in a google map? how to connect this 2 ponits with a line?

View 3 Replies View Related

Google Map Get Polygon Coordinates

Feb 17, 2009

I have seen examples where it shows the google map and you can draw the polygon, but does anyone know if there is a pre existing script that allows someone to make the polygon and populate a form of the coordinates when they are done?Basically what Im trying to do is have a person draw an area on the google map and then save those coordinates for later use.

View 1 Replies View Related

Getting Image Coordinates On Web Page

May 7, 2005

Is there a way either in PHP or Javascript where the cooridinates of a requested image can be worked out? Let me explain - our members must have an image that is requested from our web server placed above the fold on their web site.

Instead of manually checking that the image is above the fold we would like our application that sends the image (written in PHP) or the Javascript on the members web page that calls the image each time th eweb page loads to tell us where the image will be placed on a web page. Is this possible?

View 24 Replies View Related

Getting Mouse Coordinates In Safari 1.3

Oct 14, 2005

I've been having an issue with Safari when it comes to getting mouse coordinates after clicking on an element - specifically the Y coordinate. For some reason, the 0 position is the bottom left corner of the window. The further down the page, the lower the number gets. This is crazy behavior - I have this stupid thing working in every other browser, but Safari.

My script is modeled after the standard Quirksmode script:

function doSomething(e)
{
var posx = 0;
var posy = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY)
{
posx = e.pageX;
posy = e.pageY;
}
else if (e.clientX || e.clientY)
{
posx = e.clientX + document.body.scrollLeft;
posy = e.clientY + document.body.scrollTop;
}
// posx and posy contain the mouse position relative to the document
// Do something with this information
alert(posy);
}

My test HTML is like so:

<br><br><br><br><br><br><br><br>
<input type="checkbox"
<br><br><br><br><br><br><br><br>
<input type="checkbox"

Any help?

View 2 Replies View Related

Click Function An Coordinates

Sep 20, 2006

how can i call a click function to click on a link if i dont know the id of it but just know the coordinates where the link is?

View 1 Replies View Related

Coordinates For Image - Add To Page?

Oct 6, 2010

set coordinates for an image I want to add to my page? I have the center coords where I want it to be places x is 400 and y is 90. I've searched all over the internet trying to find a solution.

View 9 Replies View Related

Posting IPhone GPS CoOrdinates To SQL?

Apr 8, 2010

Trying to pass variables from the javascript into my php script and into my SQL query so i can track the location of the iphone. So far i have...

<script type="text/javascript">
function getGPS() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showGPS, gpsError);

[Code].....

This gets the coordinates in javascript and the php runs and i get a new record in the database but it doesnt pass the variables from java to php. Anyone know a workaround to get the variables from the iphone to sql on a single page?

I want this to run in the background and refresh every now and then so i can track users location.

View 1 Replies View Related

Getting At <input Type=image ...> Coordinates

Jul 23, 2005

When I click on the image form element

<INPUT type=image name=point src="map.png">

point.x and point.y values get submitted to the server
specifying where on the image I have clicked.

Is there any (simple) way to get ahold of that point.x and
point.y BEFORE they are sent to the server (and prevent
that from happening)? Ie. I just want the points where
someone clicks on an image and not interested in a submission
to the server.

View 3 Replies View Related

Set A DIV To Be A Footer: Lowest Coordinates In A Page

Aug 20, 2006

I have a DIV element in a page with a lot of other stuff (the page can
scroll several times) absolutely positioned:

View 26 Replies View Related

Track Mouse Coordinates Outside Window

Dec 17, 2006

How can I track the mouse coordinates outside the active window? No
one can tell me its not possible because Google Spreadsheets and
EditGrid both do it. When you drag down to select cells these
spreadsheet programs are capable of properly selecting the cells based
on where the mouse is, even though the mouse is way outside the
browser. I haven't been able to find any info on it or figure it out
myself. How is this possible?

View 4 Replies View Related

JQuery :: Coordinates Function - Image ?

Mar 17, 2011

Is there a way to write a function that would be....

If the coordinates of an image are _____ then do this ______ ?

View 3 Replies View Related

JQuery :: Image Map Coordinates With Pop Up Or Tool Tip?

Jul 28, 2009

i have a circular image... with pie shaped areas. i would like to use some form of jQuery and either a popup or tool tip that is CSS customizable... i looked at maphilight in the jquery plugins, but i dont see how you can make a pop up with that. unless there is another method i should go about doing this..

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved