Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: JAVA/PHP Rounding Numbers

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

    Default Trial and error...

    ok, got it...ask the guy who wrote the WUHU program..variables listing are based on php language/coding. But the variables can also be called via a java script.

    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Current Temp</title>
    
    <script type="text/javascript"> 
    window.onload = function(){
       displayTemp(%OutdoorTempDegF%);
    };
     
    function displayTemp(ct) {
       var infoDIV = document.getElementById("text");
       var text = '' " +Math.round(ct)+("F") + '<br />';
     
      
    document.write (text)
    }
    </script> 
    </head> 
    </html>
    I started writing a java script this evening, I can get it to display what I want just not in the correct font size. it prints in normal text font, but I would like to have it enlarged. any ideas on how to enlarge the text output in Java?

    GB

  2. #12
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Change:

    Code:
    document.write (text)
    to:

    Code:
    document.write ('<span style="font-size: larger;">' + text + '<\/span>');
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •