Closed Thread Icon

Topic awaiting preservation: custom JavaScript age calculator (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8821" title="Pages that link to Topic awaiting preservation: custom JavaScript age calculator (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: custom JavaScript age calculator <span class="small">(Page 1 of 1)</span>\

 
Spectra
Obsessive-Compulsive (I) Inmate

From: Ont, Canada
Insane since: Aug 2003

posted posted 08-18-2003 23:22

Okay, I need a bit of help with this. I run a game, sort of sci-fi alien based, and I'd like to create a calcucator that spits out a character's age based on three fields.

The first field (drop down) would be the character's birth month and there are only four options since there are only four seasons in this game.
Mia (Winter)
Dyo (Spring)
Tria (Summer)
Tessera (Autumn)

The second field (another drop down) would be the character birth date. Each month consists of an even fifty days, so they would be able to pick a number between 1 and 50.

The third field, (yet another drop down) which I keep messing up on, is the character's birth year. The current year right now is 81377.

So there are fifty days per month, four months in a year, making a year equal to 200 days.

What I want to do is make it so that when a person selects all three of these fields, it will show their character's calculated age in another text field. I'm sure there's a simple solution to do all of this, but I still haven't found it. So any help would be greatly appreciated.

rickindy
Nervous Wreck (II) Inmate

From: Indianapolis, In USA
Insane since: Jan 2002

posted posted 08-19-2003 14:56

Add an onChange listener to the last drop down, that calls a function that gets the value of all three selectors and prints it in the text field.


Few problems in life can't be solved by chocolate

« BackwardsOnwards »

Show Forum Drop Down Menu