Can't find the error

<?xml version =“1.0”?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>

<!-- Fig. 7.6: welcome5.html–>
<!— Using Promt Boxes -->

<html xmlns =“http://www.w3.org/1999/xhtml”>

<head>

<title> 10 points for MOHAMMAD REZZA && PASS THE TEST55+10=65</title>

<script type=“text/javascript”>

<!–

var x,y,z,o,p,maxValue,minValue;
var xVal, yVal, zVal, oVal, pVal;

// read the name from the prompt box as a string
xVal = window.prompt(“please enter your first integer”, “0”);
yVal = window.prompt(“please enter your second integer”, “0”);
zVal = window.prompt(“please enter your first integer”, “0”);
oVal = window.prompt(“please enter your first integer”, “0”);
pVal = window.prompt(“please enter your first integer”, “0”);

x=parseInt (xVal);
document.writeln("<br/>First number is: " +x);
y=parseInt (yVal);
document.writeln("<br/>Second number is: " +y);
z=parseInt (zVal);
document.writeln("<br/>Third number is: " +z);
o=parseInt (oVal);
document.writeln("<br/>Fourth number is: " +o);
p=parseInt (pVal);
document.writeln("<br/>Fifth number is: " +p);

{
var maxValue;
if (x>y)
{
maxValue =x ;
}
else
{
maxValue = y;
}
if (y>z)
{
maxValue =y ;
}
else
{
maxValue = z;
}
if (z>o)
{
maxvalue =z;
}
else
{
maxValue = o;
}
if (o>p)
{
maxvalue =o;
}
else
{
maxValue = p;
}

{
    document.writeln("&lt;br/&gt;The MAXIMUM number is: " +maxValue);
}

}

{
var minValue;
if (x<y)
{
minValue =x ;
}
else
{
minValue = y;
}
if (y<z)
{
minValue =y ;
}
else
{
minValue = z;
}
if (z<o)
{
minValue =z;
}
else
{
minValue = o;
}
if (o<p)
{
minValue =o;
}
else
{
minValue = p;
}

{
    document.writeln("&lt;br/&gt;The MInImum number is: " +minValue);
}

}

//–>

</script>

</head>

<body>
<p> click Refresh to run this script again.</p>
</body>

</html>

Use firebug to debug it. What it suppose to do.

Right now your writing outside of the body so it won’t be visible.

rewrote your code a little:


<?xml version ="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<!-- Fig. 7.6: welcome5.html-->
<!--- Using Promt Boxes -->


<html xmlns ="http://www.w3.org/1999/xhtml">

<head>

<title> 10 points for MOHAMMAD REZZA && PASS THE TEST55+10=65</title>

<script type="text/javascript">

<!--

var x,y,z,o,p,maxValue,minValue;
var xVal, yVal, zVal, oVal, pVal; 

var value_arr = new Array();

// read the name from the prompt box as a string
xVal = window.prompt("please enter your first integer", "0");
yVal = window.prompt("please enter your second integer", "0");
zVal = window.prompt("please enter your first integer", "0");
oVal = window.prompt("please enter your first integer", "0");
pVal = window.prompt("please enter your first integer", "0");



value_arr[0]=parseInt (xVal);
document.writeln("<br/>First number is: " + value_arr[0] );
value_arr[1]=parseInt (yVal);
document.writeln("<br/>Second number is: " + value_arr[1] );
value_arr[2]=parseInt (zVal);
document.writeln("<br/>Third number is: " + value_arr[2] );
value_arr[3]=parseInt (oVal);
document.writeln("<br/>Fourth number is: " + value_arr[3] );
value_arr[4]=parseInt (pVal);
document.writeln("<br/>Fifth number is: " + value_arr[4] );

function get_minimum( arr )
{
    var minimum = 0;
    if( arr.length == 0 )
    {
        return minimum;
    }
    minimum = arr[0];
    for( i = 0; i < arr.length; i++ )
    {
        if( arr* < minimum )
        {
            minimum = arr*;
        }
    }
    return minimum;    
}

function get_maximum( arr )
{
    var maximum = 0;
    if( arr.length == 0 )
    {
        return maximum;
    }
    maximum = arr[0];
    for( i = 0; i < arr.length; i++  )
    {
        if( arr* > maximum )
        {
            maximum = arr*;
        }
    }
    return maximum;    
}
document.writeln("<br/>The maximum number is: " + get_maximum( value_arr ) );
document.writeln("<br/>The minimum number is: " + get_minimum( value_arr ) );

//-->
</script>
</head>
<body> 
<p> click Refresh to run this script again.</p>
</body>
</html>

The above method is much cleaner - really no reason to not loop the function.