Results 1 to 4 of 4

Thread: HTML Rounding Numbers

  1. #1
    Join Date
    Jul 2010
    Posts
    14
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default HTML Rounding Numbers

    Is it possible to round off number using html coding?

    My weather station reports temperature, wind speeds like : Temperature:98.2F or Wind speed: 3.6 mph. I'd like to round those off if possible using HTML format.

    Format used by WS is for Temperature %[Outdoor_Temperature]deg_F%

    Any ideas as to if this can be done using html would be appreciated.

    GulfBreeze

  2. The Following User Says Thank You to Gulfbreeze For This Useful Post:

    leema (08-28-2010)

  3. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,126
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Not html, javascript could do it as well as a server side language (php, asp, cf, etc.). It depends where the value is coming from.
    Corrections to my coding/thoughts welcome.

  4. The Following User Says Thank You to bluewalrus For This Useful Post:

    Gulfbreeze (08-23-2010)

  5. #3
    Join Date
    Jul 2010
    Posts
    14
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    Thanks, that's what I thought....looks like I'll have to learn PHP..or Java Scripting...oh well thanks again!

    Gulf Breeze

  6. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,126
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Pretty easy with php although you'll have to pull the value into it and make it an integer.

    http://php.net/manual/en/function.round.php
    Corrections to my coding/thoughts welcome.

Bookmarks

Posting Permissions

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