solarix Posted December 16, 2008 Share Posted December 16, 2008 I've been looking all over and could not find the answer.Does anybody know how to make the input characters for a prompt window turn into asterisks "******" using JavaScript? I found tutorials that show how to change that on in-browser input fields but nothing on JavaScript prompt window. If anybody has any idea, I would greatly appreciate. Link to comment Share on other sites More sharing options...
Ingolme Posted December 16, 2008 Share Posted December 16, 2008 It's not possible. If you want that, it's better to get data from an input field on the page than a prompt window. Link to comment Share on other sites More sharing options...
zppblood Posted December 16, 2008 Share Posted December 16, 2008 JavaScript is horrible for security dealing with usernames/passwords. The user just has to view the source code and get them. Link to comment Share on other sites More sharing options...
solarix Posted December 16, 2008 Author Share Posted December 16, 2008 "JavaScript is horrible for security dealing with usernames/passwords. The user just has to view the source code and get them. "True, but I would think that if I have my script in a external file, that it would be protected by the Server from being viewed. Since my understanding was that most host servers for security purposes display only html files and pictures, unless setup differently. Link to comment Share on other sites More sharing options...
rnd me Posted December 17, 2008 Share Posted December 17, 2008 "JavaScript is horrible for security dealing with usernames/passwords. The user just has to view the source code and get them. "True, but I would think that if I have my script in a external file, that it would be protected by the Server from being viewed. Since my understanding was that most host servers for security purposes display only html files and pictures, unless setup differently.Sorry, but that is completely false, not a shred of truth within.external files offer absolutely no additional protection. Link to comment Share on other sites More sharing options...
solarix Posted December 17, 2008 Author Share Posted December 17, 2008 Sorry, but that is completely false, not a shred of truth within.external files offer absolutely no additional protection.Well thank you for the correction, but it would be nice to explain what can be done and why it is not offering any additional protection. Since this is a forum for learning new things. Link to comment Share on other sites More sharing options...
Ingolme Posted December 17, 2008 Share Posted December 17, 2008 Anybody can open the URL of the external file and view its source code, that's why it's not safe.PHP source code isn't visible to the browser, so you should use PHP (or any other server-side language, they all do the same things) when dealing with login and private information. Link to comment Share on other sites More sharing options...
solarix Posted December 17, 2008 Author Share Posted December 17, 2008 Anybody can open the URL of the external file and view its source code, that's why it's not safe.PHP source code isn't visible to the browser, so you should use PHP (or any other server-side language, they all do the same things) when dealing with login and private information.Thank you Ingolme, now that is a lot more informational. Link to comment Share on other sites More sharing options...
Synook Posted December 18, 2008 Share Posted December 18, 2008 Also, it is possible to edit client-side code after it is downloaded, for example through Firebug, and overload functions or just delete security measures Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.