Considering the enter key only does new lines and doesn't submit the form. Quite impossible.
You'll need to tab out of whatever box your typing in obviously.
Well yeah, but how would you do it just by clicking enter? I've tried all methods and they dont actually work.
Attach a JavaScript keydown event, if the key is enter submit the form. This isn't possible with PHP as it is client side.
Again, I've tried many methods.. this is what I've got at the moment.
<script type="text/javascript">
<!--
function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (keycode == 13)
{
document.form.submit();
return false;
}
else
return true;
}
//-->
</script>
<form>
<textarea name="nonaction" cols="50" rows="3" wrap="virtual" id="rptext" class="textarea" onKeyPress="return submitenter(this,event)"></textarea>
<input type=submit value=SUBMIT>
</form>
Thoguh it doesn't work, though yes. It is a text area.