Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by walker0723

I'm using javascript prompt to get text input from user. (to store user name with a game score)

But when I trying to call prompt like below, all animation stops suddenly.

var name=prompt("Please enter your name","Harry Potter");


Is there any way to play the animation with the prompt? or other suggestions about getting text input from user?

1 decade ago by SnakePlissken

Do not use a prompt instead create a separate form div that pops up when you want the user to place a name. Here is an example of a form.

<form action="" method="get">
  First name: <input type="text" name="fname" /><br />
  Last name: <input type="text" name="lname" /><br />
  <input type="submit" value="Submit" />
</form>

You can then pass that input box into another variable on click to be manipulated by the impactJS engine or save it off to a database.

1 decade ago by walker0723

I'll try it right now. Thank you!
Page 1 of 1
« first « previous next › last »