I'm attempting to verify player name input and I'm having problems. I'm using this bit of code and instead of getting the expected results, or even "Test", it's printing absolutely nothing. ((I've got it spread out over a couple pages to test.))
I'm not real familiar with Regular Expressions or Javascript, except what I've been able to put together from the web and my developer friends, so I'm mainly using stuff copied from Stack Overflow. Even so, seems to me this should work, and I'm not sure why it isn't.
Help would be appreciated.
Cheers,
<<set $player.name to "Test">> <<textbox "$input" "" autofocus>> <<set $player.name to $input.replace(/[^0-9a-z]/gi, '')>> <<print $player.name>>
I'm not real familiar with Regular Expressions or Javascript, except what I've been able to put together from the web and my developer friends, so I'm mainly using stuff copied from Stack Overflow. Even so, seems to me this should work, and I'm not sure why it isn't.
Help would be appreciated.
Cheers,