Con Man50(aka connor y.)
New member
I'm trying to make a contact form. I need help so that in the message input when you press enter it goes down to the next line of text so they can type on the next line just like in regular email forms.
This is my input html so far:
<p>Message:<br>
<input type="text" name="Message" style="width:500px; height:150px;" onKeyPress="return disableEnterKey(event)">
Here is the javascript event:
<script language="JavaScript">
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if(key == 13)
return false;
else
return true;
}
</script>
Everything is working fine, but I need it to go down to the next line.
How would I do this?
This is my input html so far:
<p>Message:<br>
<input type="text" name="Message" style="width:500px; height:150px;" onKeyPress="return disableEnterKey(event)">
Here is the javascript event:
<script language="JavaScript">
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if(key == 13)
return false;
else
return true;
}
</script>
Everything is working fine, but I need it to go down to the next line.
How would I do this?