Dysan Posted January 17, 2008 Share Posted January 17, 2008 Using JavaScript, how do I enable the user to type directly onto the screen, and store each character entered, as a string inside a hidden form field? Quote Link to comment Share on other sites More sharing options...
Dysan Posted January 17, 2008 Author Share Posted January 17, 2008 Is it possible to enter text directly on the page using JavaScript? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 17, 2008 Share Posted January 17, 2008 what are you wanting a keylogger? the closest thing I can think of would be something like this (but as soon as they click somewhere else in the page, it will no longer work: <script language="javascript"> function getStuff() { document.myForm.grabber.focus(); } </script> <form name="myForm"> <input type="hidden" name="grabber"> </form> possible alternate methods 1.) you can store the values from all other fields into a hidden input field - that is also possible. 2.) you may be able to insert keyCodes (and have javascript to interpret them) into a hidden input field also. note: you know some might consider what your doing as creating spyware or a trojan horse. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.