chusstoockact
New Member
so I basically have a function that detects the key that the user presses, and it submits a form whenever the user hits the space bar (don't ask why). Here is my javascript:\[code\]document.addEventListener('keydown', function(e){ if(e.keyCode === 32) { setTimeout("submit()",1); }})\[/code\]so the form submission works, and the fields are sent to the database. there's supposed to be a space in the end of the string that it submitted, obviously because the user hit the space bar to submit, but the \[code\] \[/code\] doesnt show up in the end of the string when it is displayed.