Input a phone number in a software simulator - Javascript required
Hi. I don't know if anyone can help. I'm building a simulator of a piece of software for a client who needs people training on the software - and doesn't want them practicing on the live system!. We've done a few of these and Storyline works really well for this. I grab a screen, overlay it with text input boxes and then pretend to be the software.
I have one minor problem. I want to input a telephone number. The software I'm simulating doesn't parse the number it just only accepts digits. So, if I create a number variable and use a numeric entry box, this works fine. BUT when I run the simulator the entry box shows the default value of the variable i.e. '0' - the software doesn't do that. So, I'm looking for a way to get rid of that zero in the screen display.
I figure if I use a JavaScript trigger I can read the input character by character rejecting anything that's not a digit and then set a Storyline Variable (doesn't have to be a numeric variable - a text variable would work better) at the end. My limited JavaScript isn't up to that though! Any assistance would be greatly appreciated.