colour.htm

<html>
<head>
    <title>Favourite colour</title>
<link rel="stylesheet" type="text/css" href="breaking.css" />
<script src="include.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">

//This file is fairly self-explanatory: it asks
//for a colour, submits it to a PHP page and,
//on return, moves to the next page
function setColour ()
{
     var strColour = document.getElementById("txtColour").value;

     var urlPost = "putcolour.php?colour=" + strColour;

     doHttpRequest(httpXMLUser, handleXMLUserResponse, urlPost, "POST");
}

   function handleXMLUserResponse() 
   {
       top.location = "wordweb.htm";
   }

function handleReturn()
{
    setColour();
}

</script>
</head>
<body>
<h1>Favourite Colour</h1>
<p class="intro">Now, start thinking about the character you'll play.</p>
<p>Firstly, what is your character's favourite colour?</p>
    <p><input type="text" id="txtColour" value="" onKeyPress="handleKeyPress(event, handleReturn)"/></p>
    <p><input type="button" value="Continue" onclick="setColour()" /></p>
</body>
</html>