visitor interaction

hello all.<br />
<br />
i would like to know if it is possible to:- designe pages that will react to a visitor input and load new pages depending on the visitors input.<br />
<br />
i.e. (the visitor is my six year old son who lives with his mother) i want him to load a page within my site that would have a picture off a sheep, and i want him to be able to type in the correct spelling etc. then the page to load another page depending on his reply. i.e. "well done" with a sound file, or "are you sure" etc.<br />
i know it is a big ask but would be grateful of any help<br />
<br />
cheers <br />
<br />
bilko<!--content-->If you used your example about your son, this is a way that you could do it:<br />
<br />
<head><br />
<script language="JavaScript"><br />
<!--<br />
<br />
function checkAnswer() {<br />
<br />
if (document.question.answer.value.toLowerCase=="sheep") {<br />
//Replace WellDonePage.html with your correct answer page.<br />
location.href=http://www.htmlforums.com/archive/index.php/"WellDonePage.html"<br />
}else{<br />
//Replace TryAgain.html with your incorrect answer page.<br />
location.href=http://www.htmlforums.com/archive/index.php/"TryAgain.html"<br />
}<br />
<br />
}<br />
<br />
--><br />
</script><br />
</head><br />
<body><br />
<p align="center"><br />
<!--Replace SheepPicture.gif with the real picture's URL--><br />
<img src=http://www.htmlforums.com/archive/index.php/"SheepPicture.gif"></p><br />
<p align="center">What is this a picture of?</p><br />
<p align="center"><br />
<form name="question"><br />
<input type="text" name="answer"><br><br />
<input type="button" value="Finished!"><br />
</p><br />
</form><br />
</body><!--content-->yes you could do it by javascript, but the best bet is serverside code like cgi, or php , asp<br />
<br />
<br />
javascript would be to difficult and long<!--content-->Well, CGI and ASP would be too complicated for such an easy task. JavaScript would probably be the best, though you could use the others.<!--content-->
 
Back
Top