DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2008
    Posts
    1

    Need help with this code

    Code:
    <SCRIPT  LANGUAGE="JavaScript">
    var now = new Date();
    var hr = now.getHours();
    var min = now.getMinutes();
    
    if (hr == 18) && (min == 0) // The time I want this to calculate
    var tf = <!--outsidetemp--> // this is a tag generated by my weather station, it changes as temp. changes
    var df = <!--outsidedewpt--> // this is a tag generated by my weather station, it changes as dewpoint changes
    tc = 5/9* (tf - 32);
    tc = Math.round((tc*10))/10;
    dc = 5/9*(df - 32)
    dc=Math.round((dc*10))/10;
    m = tc- (tc - dc) /2 -3.5 
    el = 9/5* (ml) +32 
    el = Math.round((el*1))/1; // I want to keep this variable without it changing until the next time the time is 18
    mh = tc + (tc - dc) /2 +5.7 
    eh = 9/5 * (mh) + 32
    eh = Math.round((eh*1))/1;  // I want to keep this variable without it changing until the next time the time is 18
    
    
    document.write("Estimated Low Temperature " + el) //?
    document.write("Estimated Low Temperature " + eh) //?
    </SCRIPT>
    Last edited by valleyjim; 03-01-2008 at 10:56 AM. Reason: Added Code Tags

Similar Threads

  1. Jupitermedia Legal Notice -- NO PERMISSION TO USE CODE SAMPLES?!
    By Noryk Rekrap in forum Talk to the Editors
    Replies: 3
    Last Post: 08-23-2007, 03:56 PM
  2. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 06:41 PM
  3. .NET equals Efficiency
    By Kevin in forum .NET
    Replies: 150
    Last Post: 03-04-2002, 05:40 PM
  4. Another Language
    By Steven Bell in forum .NET
    Replies: 260
    Last Post: 06-01-2001, 04:32 PM
  5. error code in JSP(please chek the code)
    By satish in forum Java
    Replies: 1
    Last Post: 09-22-2000, 09:11 AM

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
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links