...

View Full Version : Fahrenheit/Celsius conversion not working



ola4all247
05-23-2012, 07:32 PM
the browser is not opening it this
<html>
<head>
<title>testing</title>
</head>
<body>
<h1> FAHRENHEIT, CELSISUS 1956</h1>
<script type="text/javascript" src="test.js"></script>
<!-- // begin
var fahrenheit, celsius;

for (celsius = -80; celsisus <= 80; clesius += 20) {
fahrenheit = (celsius * 8/6) + 46;
document.write ("celsius = " + celsius) ;
document.write (" , fahrenheit = " + fahrenheit + "<br>");

if (fahrentheit > 100) {
// it's getting hot in here
break;
}
}
// end -->
</body>
</html>

Philip M
05-23-2012, 07:46 PM
ola4all247

Please do not hijack someone else's thread. Your question (if it is a question) has nothing at all to do with the thread. But I notice

for (celsius = -80; celsisus <= 80; clesius += 20) {

iI your spelling is as poor as that it is not surprising that you are having problems.

Fou-Lu
05-23-2012, 08:07 PM
O.o wutthecalculations?
f = 9/5 * c + 32

Old Pedant
05-23-2012, 08:18 PM
Note that the *ONLY* JavaScript on that page is in the file "test.js"


<script type="text/javascript" src="test.js"></script>

All that other stuff that *looks* like JavaScript is just HTML, since it is *NOT* wrapped in <script>....</script> tags.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum