dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Setting up a script to change coordinates

  1. #1
    Join Date
    Sep 2013
    Posts
    1

    Setting up a script to change coordinates

    Hello all, I am a beginner at scripting but need this done for a personal project.

    My aim is to make a website, with two input boxes, users will then enter two co-ordinates: "571837.62N" AND "0021601.95W"

    Then the website will convert the two inputed coordinates to the following output format "N057.18.37.620 W002.16.01.950".

    Can anyone provide me with a code for this?

    Many thanks in advanced.

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,589
    Like so many requests, this is not a code forum where answers to probels are given, you need to provide the code that you have a problem with resolving and people will then help.

    If you know any javascript, that could be done at the web browser and the input values then sent to the server.
    If your post falls off the page, bump it. ...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,674
    Most robust solution is probably to just have separate input fields for degrees, minutes, seconds, and direction, and not have to do any string parsing (which would leave at the mercy of the user correctly inputting any specific format. If this is some classroom assignment where you have to do it this way, then on the PHP side of things, substr() is probably the main thing you need to look at.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles