L
lex parker
I thought java script was included with the package. Yet
when I run a program it gives me "error on page" message.
The source code was verified syntactically correct through
validator.w3.org website. I will enclose the source code.
It's copied verbatim from a college text book.
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns= "http://www.w3.org/1999/xhtml">
<head>
<title>Calculating Sphere Volumes</title>
<script type = "text/javascript">
<!--
function displayVolume()
{
var radius = parseFloat(
myform.radiusField.value );
window.status = "Sphere volume is " +
sphereVolume( radius );
}
function sphereVolume( r )
{
return (4.0 / 3.0) * math.PI * math.pow( r,
3 );
}
// -->
</script>
</head>
<body>
<form name = "myform" action = "">
Enter the radius of a sphere<br />
<input name = "radiusField" type = "text" />
<input name = "calculate" type = "button"
value = "Calculate" onclick
= "displayVolume()" />
</form>
<p>
<a
href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31"
width="88" /></a>
</p>
</body>
</html>
when I run a program it gives me "error on page" message.
The source code was verified syntactically correct through
validator.w3.org website. I will enclose the source code.
It's copied verbatim from a college text book.
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns= "http://www.w3.org/1999/xhtml">
<head>
<title>Calculating Sphere Volumes</title>
<script type = "text/javascript">
<!--
function displayVolume()
{
var radius = parseFloat(
myform.radiusField.value );
window.status = "Sphere volume is " +
sphereVolume( radius );
}
function sphereVolume( r )
{
return (4.0 / 3.0) * math.PI * math.pow( r,
3 );
}
// -->
</script>
</head>
<body>
<form name = "myform" action = "">
Enter the radius of a sphere<br />
<input name = "radiusField" type = "text" />
<input name = "calculate" type = "button"
value = "Calculate" onclick
= "displayVolume()" />
</form>
<p>
<a
href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31"
width="88" /></a>
</p>
</body>
</html>