Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Thursday, October 4th, 2007

Time Event
3:25p
How do I make a page that remembers scores & opens links based on an "if...then..." test?
Hi all,

I am trying to create a set of pages that's like a little "choose your own adventure" style game. It started off as a basic html page (i.e. you click on your chosen option and it takes you to the next stage in the story), but i would like to make it more intelligent.

I would like to be able to have it so that the user accumulates various scores, and then is given options based on what their score is.

For example, a score might be "money". If the user chooses some option, it takes them to a page that adds "50" to their "money" score.

Later on, they may encounter a page where "if money >= 50, direct to link 1; if money < 50, direct to link 2."

Does anybody know how to do this?

I have been trawling through countless Javascript and HTML tutorials for the last couple of hours, and have only found little bits and peices of what i need.

I have found examples of "if... then..." statements in Java, but i have not found any way to establish some score ("money") that can accumulate when a particular page is accessed.

I have also not found any way to make the outcome of an "if... then..." test determine which page you are then linked to.

Can anybody help?

(cross-posted to Imagehtmlhelp)
5:33p
Hopefully last time :-/
Hi everyone,

First off, thank you to everyone who has helped thus far!

I have two final small details both relating to IE6.

I still cannot get the sub menus in the drop down menu to display. It works in IE7, Firefox, etc, but not in IE6.

The other "problem", though if I don't find a solution to this one, I won't be overly upset, is in all other browsers I have the whole website centered. In IE6, it is aligned on the left.

The website again is here. The CSS is here and the Javascript is here.

I truly appreciate this. I have been googling this problem for several hours and would appreciate any feedback!!

THANK YOU!!!!

Brittany

<< Previous Day 2007/10/04
[Calendar]
Next Day >>
About LiveJournal.com
Image