Submit username and password javascript (not a form)
<p>I have a popup which asks the user for login information, which means two input text fields for password and username. </p>

<p>Now as I will be verifying the information using ajax I didn't wrap the elements on a  because form always needs a php action, correct? or am I missing something?</p>

<p>So I'd like to know if there is a fancier way to check if the user pressed enter, in order to submit the login information, than checking each time a key is pressed, with keydown, if it's the enter key. </p>

<p>Thanks in advance</p>
