Hello, I am definitely a beginner. I need some help with this application. I need to be able to have an alert box pop up and as the user 'Enter degrees in Fahrenheit\n Or enter 999 to end entries'. I am not sure what I am doing wrong.
Thank you in advance for anyones help on this. :)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Convert F degrees to C degrees</title>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script>
var entry;
function convertToCelsius(fahrenheit) {
return (fahrenheit - 32) / 1.8;
}
do {
entry = prompt('Enter degrees in Fahrenheit\n Or enter 999 to end entries',
999);
entry = parseInt(entry);
if (entry != 999) {
alert('Fahrenheit = ' + entry + ' degrees' +
'\nCelcius = ' + convertToCelsius(entry) + ' degrees');
}
}
while (entry != 999);
</script>
</head>
<body>
<section>
<h1>This page is displayed after the JavaScript is executed</h1>
</section>
</body>
</html>