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? Link to comment https://forums.phpfreaks.com/topic/86474-type-on-page/ 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? Link to comment https://forums.phpfreaks.com/topic/86474-type-on-page/#findComment-441892 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. Link to comment https://forums.phpfreaks.com/topic/86474-type-on-page/#findComment-442218 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.