The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Javascript Game question

Hi. I need to create a simple (I hope) game and I'd like to do it w/ Javascript, if possible. Here's the gist - I've got a list of 6 people. The object of the game is to find out which person you're most like. There are five questions w/ 6 answers each. Based on how you answer the five questions, the results would tell you which of the 6 people you're most like. I got the idea from here: http://disney.go.com/princess/html/main_iframe.html - if you navigate to the games section, then the "Which Disney Princess Are You?" game. I would love to do this in Flash, but I don't know it well enough, so I'm trying javascript - a much more basic version of the link above, I know. Any suggestions would be welcome. Thanks!

js game

Hi lahddah, welcome to the forums,
Keep in mind that javascript is client side. Users could look at the script and "cheat". Probably not that big of a concern if this is purely for entertainment.
Anyway, it should be easy enough to do a Q? A: 5 points B: 10 points etc.
add your "score" If you got between this and that then.... type of thing. Just give the form selects (or radios) numeric values add them together and test in if's.

Thanks, felgall and Mittineague! felgall, that turned out to be EXACTLY what I was looking for! It took a while for me to respond as I wanted to customize everything and make sure it still worked. It does....never actually thought that JS would be able to do that in just that manner. Thank you, again, for your suggestions!