User Profile

Collapse

Profile Sidebar

Collapse
Sorinpass
Sorinpass
Last Activity: Jun 19 '12, 05:59 PM
Joined: Jun 19 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sorinpass
    replied to How to compare two Ajax elements
    found the answer if anyone is interested

    Code:
    	var temp0 = parseFloat(document.getElementById('temp0').innerHTML)
    	var temp2 = parseFloat(document.getElementById('temp2').innerHTML)
    
        if( temp0 < temp2 ) {
        	document.getElementById('temp3').innerHTML = '<font color="#00FF00">ON</font>';
        } else {
        	document.getElementById('temp3').innerHTML = '<font color="#FF0000">OFF</font>';
    ...
    See more | Go to post
    Last edited by acoder; Jun 20 '12, 09:40 AM. Reason: Please use [code] tags

    Leave a comment:


  • Sorinpass
    started a topic How to compare two Ajax elements

    How to compare two Ajax elements

    Ok so I'm trying to monitor and control something with a Pic-web from microchip. I managed to program it all except for one thing. I need to compare two temperatures that it gives me, and if one of them is smaller that the other then a relay need to be activated, if its bigger or equal then another relay must be activated. From what I understood Pic-web updates an xml file (status.xml) then the website (using ajax) takes the values from there and...
    See more | Go to post
    Last edited by acoder; Jun 20 '12, 09:40 AM. Reason: Added [code] tags
No activity results to display
Show More
Working...