# Temperature Converter Page (unable to see result after onclick)

**URL:** <https://forum.kirupa.com/t/temperature-converter-page-unable-to-see-result-after-onclick/662683>\
**Category:** programming\
**Created:** [October 31, 2023, 9:04am UTC](https://forum.kirupa.com/t/temperature-converter-page-unable-to-see-result-after-onclick/662683 "2023-10-31T09:04:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Singh1](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/anand_singh1/32/23466_2.png) [@Anand\_Singh1](https://forum.kirupa.com/u/Anand_Singh1)\
**Post date:** [October 31, 2023, 9:04am UTC](https://forum.kirupa.com/t/temperature-converter-page-unable-to-see-result-after-onclick/662683/1 "2023-10-31T09:04:02Z")

</div>

index.html

 Temperature Converter 
# Temperature Converter

Enter a country and temperature:

 Convert 

styles.css  
body {  
font-family: Arial, sans-serif;  
text-align: center;  
}

h1 {  
color: #0074d9;  
}

input {  
padding: 10px;  
margin: 5px;  
}

button {  
background-color: #0074d9;  
color: #fff;  
padding: 10px 20px;  
border: none;  
}

script.js  
function convertTemperature() {  
const country = document.getElementById(“countryInput”).value;  
const temperature = parseFloat(  
document.getElementById(“temperatureInput”).value  
);

if (country === “United States” || country === “Liberia”) {  
temperature = temperature + “F”;  
} else {  
temperature = ((temperature - 32) \* 5) / 9 + “C”;  
}

document.getElementById(“result”).textContent =  
"The temperature is: " + temperature;  
}

Here is the full code of converting temperature. I am unable to see any result after I click the convert button.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [November 1, 2023, 2:00am UTC](https://forum.kirupa.com/t/temperature-converter-page-unable-to-see-result-after-onclick/662683/2 "2023-11-01T02:00:27Z")

</div>

When you check your DevTools Console log, what error do you see? 🙂
