cidgreen
10-08-2002, 11:02 AM
Hello, my first post - I hope it doesn't show me up as too much of a simpleton..
My aim is to have input boxes on a page of my site, in a type of quiz, where the user types the answer into a text box and submits it. Simplistically, it is to guess the identity of an image, and thus if they enter the correct answer I want the image (previously hidden or replaced with a ? or something like that) to be revealed. If the wrong answer is given, I guess I need some kind of message to pop up and say so.
e.g. a picture of a dog is hidden, someone types in 'dog' into the input box and the image is revealed.
I have been scouring the web all morning looking for clues - I have found onSubmit which I think may be the key to it using the FORM command, but I cannot seem to find a way to have the image revealed rather than a link to another page being activated when the correct answer is submitted.
Could anybody either let me know how I could alter the example I have found on this page...
http://www.idocs.com/tags/forms/_FORM_onSubmit.html
...or perhaps point me in the direction of another site which explains better how to sort this type of thing out?
I do hope someone can help and that my first post hasn't been too much of a 'please do it for me' type of thing. Any help or direction at all will be most gratefully received - I'll buy you a pint!
Or post you one anyway...
Many thanks in advance,
Chris.
My aim is to have input boxes on a page of my site, in a type of quiz, where the user types the answer into a text box and submits it. Simplistically, it is to guess the identity of an image, and thus if they enter the correct answer I want the image (previously hidden or replaced with a ? or something like that) to be revealed. If the wrong answer is given, I guess I need some kind of message to pop up and say so.
e.g. a picture of a dog is hidden, someone types in 'dog' into the input box and the image is revealed.
I have been scouring the web all morning looking for clues - I have found onSubmit which I think may be the key to it using the FORM command, but I cannot seem to find a way to have the image revealed rather than a link to another page being activated when the correct answer is submitted.
Could anybody either let me know how I could alter the example I have found on this page...
http://www.idocs.com/tags/forms/_FORM_onSubmit.html
...or perhaps point me in the direction of another site which explains better how to sort this type of thing out?
I do hope someone can help and that my first post hasn't been too much of a 'please do it for me' type of thing. Any help or direction at all will be most gratefully received - I'll buy you a pint!
Or post you one anyway...
Many thanks in advance,
Chris.