Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions getting coords from an image.
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


muhilan
getting coords from an image.
2 Answer(s)      2 years and 11 months ago
Posted in : JavaScript Questions


how to get coordinates dynamically(in run time) from an image?? pls help me....


Advertisement
View Answers

December 13, 2011 at 3:41 PM




December 13, 2011 at 3:48 PM


<html>
<head>
<script language="JavaScript">
function show(event){
    pos_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("pointer_div").offsetLeft;
    pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("pointer_div").offsetTop;
    document.getElementById("cross").style.left = (pos_x-1) ;
    document.getElementById("cross").style.top = (pos_y-15) ;
    document.getElementById("cross").style.visibility = "visible" ;
    document.pointform.form_x.value = pos_x;
    document.pointform.form_y.value = pos_y;
}
</script>
</head>
<body>
<form name="pointform" method="post">
<div id="pointer_div" onclick="show(event)" style = "background-image:url('temple.jpg');width:500px;height:333px;">
<img src="point.gif" id="cross" style="position:relative;visibility:hidden;z-index:2;"></div>
You pointed on x = <input type="text" name="form_x" size="4" /> - y = <input type="text" name="form_y" size="4" />
</form> 
</body>
</html>


Related Tutorials/Questions & Answers:
getting coords from an image.
getting coords from an image.  how to get coordinates dynamically(in run time) from an image?? pls help me
Getting image pixel values
Getting image pixel values  how to get image pixels values on mouse... GetPixels extends JPanel { BufferedImage image; JLabel[] labels; public GetPixels(BufferedImage image) { this.image = image
Advertisements
getting files from VSS
getting files from VSS  I am not able to get the files from VSS.I am using following code. and just let me know is localpath attribute is for our local project path? I am getting the problem in this line failed
Getting data from servlet into javascript
Getting data from servlet into javascript  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
getting values from dropdown list
getting values from dropdown list  I am having a dropdown list which has hardcoded values ( we need it hardcoded only and will not be populated from... to the action. My action is getting called however, i am not sure how to pass
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown...=stmt.executeQuery("select fname,empid from cremp where empid='"+empid
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown... an internal error () that prevented it from fulfilling this request. exception
Getting environment variable value from java
Getting environment variable value from java  Getting environment variable value from java
Fetching image from database
Fetching image from database  I have uploaded image path and image name in database so, now how can i display that image using JSP or HTML page(is it possible to display using tag using concatination). image path i have stored
getting values from database - JSP-Servlet
getting values from database  I tried the following code abc.html aaa.jsp I am not getting exceptions now. But I am not getting output also. Plz help.   Hi Friend, Run your
Getting and sending data to and from mobile and the system
Getting and sending data to and from mobile and the system  Hi, For getting and sending data to mobile from system.make system is a server.From mobile send a request to the server and get response.Then process the response
Getting Image from a URL
Getting Image from a URL       This example shows how to get an image from... and then setting the size of the window. Now we are getting content pane
Getting Json data from servlet to javascript variable
Getting Json data from servlet to javascript variable  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
getting null value in action from ajax call
getting null value in action from ajax call  Getting null value from ajax call in action (FirstList.java)... first list is loading correctly. Need...; <param name="fileUpload.allowedTypes">image/png,image/gif,image
getting null value in action from ajax call
getting null value in action from ajax call  Getting null value from ajax call in action (FirstList.java)... first list is loading correctly. Need...; <param name="fileUpload.allowedTypes">image/png,image/gif,image
getting null value in action from ajax call
getting null value in action from ajax call  Getting null value from ajax call in action (FirstList.java)... first list is loading correctly. Need...; <param name="fileUpload.allowedTypes">image/png,image/gif,image
getting contacts from gmail - JSP-Servlet
getting contacts from gmail  hi there, would you please tell me step by step how can i integrate the gmail contacts with my web application. please reply me asap. I'll be greatfull to you. Rajesh
Getting Latitude and longitude from GPS location?
Getting Latitude and longitude from GPS location?  I want to get longitude and latitude from GPS location. I want to find the distance between... of these two places then it is easy to find distance between them(from those Lat and long
Getting Current Directory from java - Java Beginners
Getting Current Directory from java  I'm designing an application in linux where i need to get the current directory of my java file... I'm using System.getProperty("user.dir") but its not working properly It's returning /opt
Data extraction from an image file.
Data extraction from an image file.  I have made an image... data from the the image which also include deleted data.Can i used java to extract these data from the image file? Which are the libraries to be used
getting unique value from java.util.random - Java Beginners
getting unique value from java.util.random  i am doing a shopping... for that i used java.util.random to get random productid from product table, but the value which i am getting contains duplicate values and it is not unique, my
How to retrieve image from database
How to retrieve image from database  hi........ How to retrieve image from database when it is stored. I have stored image in postgresql and want... but it retrieves as a string and not complete image can u tel me the conversion
image upload with jsp from form
image upload with jsp from form  hi i used the code specified in your following post http://www.roseindia.net/answers/viewqa/JSP-Servlet/9749-image-upload-and-stored-in-database.html but i am getting following error
Java image query from Rupesh
Java image query from Rupesh  who give web page link to any submenu in menu bar of screen in java so that after click on that submenu, this submenu direct link to web brower or web page
store and retrive image from the database
store and retrive image from the database  please provide me... to store and retreive images from sql database using sql commands -how to store and retreive images from sql database using asp.net/c# thanks in advance
how to fetch image from mysql using jsp
how to fetch image from mysql using jsp  how to fetch image from mysql using jsp
Reading text from image file - Java Beginners
Reading text from image file  How Read text from image file
Retrieving the Image from a database Table
Retrieving the Image from a database Table Consider a case where we want... to retrieve the image from the database table. You can do it very easily after... the image from the database table in prepareStatement() method of the Connection
store & retrive the image from oracle database
store & retrive the image from oracle database  how can i store the image path in tha database & fetch that image from oracle database
dynamically created links id from mysql table is not getting
only getting the last recordset from table malayalamcinema, plz help me, its...dynamically created links id from mysql table is not getting  guys, i'm trying to access dynamically called attributes from mysql table as a link
Image retrieval from mysql - JSP-Servlet
Image retrieval from mysql  Hai friends, I used the following code to insert image into mysql db. Db data type is blob.... Inserted file image does not exist database limit. But, while retrieving image
Advertisements
 

 

 

DMCA.com