I'm trying to use console.getkeys to have a user select a page in an address book they want to go to.
I have a variable, pages, which contains a number so I'm using
var keypress = console.getkeys(pages);
According to the jsobjs file:
"get one key from of a list of valid command keys, or a number between 1 and maxnum"
Since I'm passing a number, I would expect only to be able to input a number between 1 and whatever pages is, however it lets me enter any character.
What am I doing wrong?
Just in case, I also tried forcing pages to be typeof number.
| Sysop: | Eric Oulashin |
|---|---|
| Location: | Beaverton, Oregon, USA |
| Users: | 123 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 04:13:47 |
| Calls: | 7,861 |
| Calls today: | 6 |
| Files: | 9,395 |
| D/L today: |
323 files (77,113K bytes) |
| Messages: | 399,869 |
| Posted today: | 2 |