I wondered if using a js prompt to take a password value from the user and place it in a form field has many/any dangers?
I know I could use a modal or something similar, but I just wondered what the consequences could be (other than it may feel strange to a user) bearing in mind the app is installed as native through Phonegap (if it makes a difference).
There’s a few issues if you are referring to the
window.prompt(message,default);JS prompt.1.) On the desktop IE’s support is weak – it doesn’t support all character sets, the message size is limited, doesn’t center properly, and the dialog is beyond ugly. (Bug Info link1, link2)
2.) On Windows 8, in the “Metro Mode” browser,
window.promptis defined, but attempting to call it completely fails (the browser just ignores it) and the variable you were hoping to populate gets anullvalue assignedSince #2 may affect Windows 8 Phones (I’m not sure how much of the code base is ported directly for the phones) you’ll want to be aware of this potential incompatibility.