Results 1 to 3 of 3
Dec 3, 2002, 04:30 #1
Here's what I'm looking for:
A small form that asks the visitor for some word or number (the answer to which they get elsewhere - it's part of a riddle kind of game I am having on my site).
User types in the word or number and hits "submit". If it matches the right answer then he is taken to a certain URL (where the game continues). If it's not the right answer then he is taken to some other page where I will tell him to try again.
Dec 3, 2002, 04:57 #2
- Join Date
- Aug 2002
- Wellington, New Zealand
- 0 Post(s)
- 0 Thread(s)
Something like this should do the trick.
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<title> New Document </title>
var Answer = document.getElementById("answer");
if(Answer.value == "Secret")
location.href = "correctpage.html"
location.href = "failpage.html"
<form onSubmit="CheckAnswer(); return false;">
<input id="answer" name="answer" type="text"/>
<input type="submit" value="Go!">
Dec 3, 2002, 06:17 #3