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,360
    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.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,384
    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