Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:15:08+00:00 2026-06-08T08:15:08+00:00

I have made this code working but I want to have an alert ,

  • 0

I have made this code working but I want to have an alert , so i can see all the cordinate of x1 y1 and x2 and y2, can any one help me, the example is from this site http://odyniec.net/projects/imgareaselect/examples-callback.html#submitting-selection-coordinates-demo i have applied the code but I i dont get the cordinats, I can get the width and height tho. My code is in here http://jsfiddle.net/qzHSe/

I want to have the cordinate as a respond, I know php code will give me something but we are working with struts and java but, besides that I just want to alert the cordinate some how on the screen so I can see it myself first.

Thank you, I am very new to these things

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:15:10+00:00Added an answer on June 8, 2026 at 8:15 am

    I have cleaned up some of your code and found a typo in the alert of the selection.x1 value (you’ve typed selction.x1, missing an e).

    http://jsfiddle.net/qzHSe/1/

    Also, note that you don’t have to call $(img).imgAreaSelect() every time you want to add more options. Just use a coma and add it like I’ve done.

    By calling the function many times, jQuery has to do a look up in the DOM to grab the object for you to use. If you really have to call it many times, consider caching the value of the object in a variable:

    var $img = $(img);
    
    // now you can use $img in all your code as many times you need
    // without jQuery search the DOM structure every time
    
    $img.imgAreaSelect();
    
    // some code
    $img.attr("src", "some/path/to/image.jpg");
    
    //some more code
    $img.remove();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: I have made a clean, new project, but still can't get it working.
This code working for me to display the door-hanger popup. But, when I want
I have made this code: var foo=document.createElement(div); var childs=foo.getElementsByTagName(*); console.log(childs.length);//0 OK var a=document.createElement(a); foo.appendChild(a);
I have made this code to open a database(created in SQLite browser) stored in
I have a problem, and I made this test code to show you my
I have a line, which is a sprite made by using this code CGPoint
I have made this webpage, you can check it out here http://www.bettingtowin.net/webcam.html I have
I have a rich:dataTable . I want to hide a row with this code:
I'm new to JavaScript and I can't figure out why this code isn't working.
I have made a drop down menu which is working fine, but when i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.