View Full Version : Distance to an Object

04-30-2007, 08:33 PM
Ok, I have an assignment in a class and I have no idea how to do it. The assignment says this:
Your teacher has asked you to write a HTML document that has embedded JavaScrip within it. The task is to produce a menu of possible location within your country to which you would like to travel. The menu must consist of a minimum of 6 locations. The user of this document will be asked to enter the menu item number. The script will produce a description of the location and the distance from your present location. Below is an example of what the users will see on their screen.

I have most of it finished now, but I can't figure out how to get distance to an object from your current location, because the location changes with the computer. Do any of you know how or should I just take a cut in points...

04-30-2007, 09:24 PM
I think you are over thinking this. The distance would be from your present location or city, to the location you are traveling to in your country.
I don't think the instructor is looking for a GPS interface.