Object doesnt support this property or method in javascript
<pre><code>function add(id)
{
    var tempid=document.getElementById(id);
    var patterm=/@/;
    var value=tempid.match(patterm);  // This is where I'm getting the error
    if(value==null)
    {
        var length=document.getElementById(id).length();

        tempid=tempid.setchatAt(length+1,'@messung.com');
    }
    else
    {
    }
}   
</code></pre>
