Results 1 to 3 of 3

Thread: Setting up a script to change coordinates

Hybrid View

  1. #1
    Join Date
    Sep 2013

    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
    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.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode 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
    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.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

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