I need to change the content of a div using ajax when i hit the 'return' key on my keyboard. How do i get js to aknowledge the 'return' character? chr(13) doesn't seem to work.
Thanks!
Thanks!
Code:
function handle_textarea(t, n)
{
var val=t.value;
var the_length=value.length;
var last_char=val.charAt(the_length-1);
if (last_char=='chr(13)')
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="new_row.php"
url=url+"?row_num="+row_num
url=url+"&rand="+Math.random()
xmlHttp.onreadystatechange=list_stateChange('list_id')
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
else
{
resize_textarea(t, n);
}
}
Comment