What is the proper way of doing this?

```
$chatterhtml .= '<span style="float:right;" >
          <a href="javascript:void(0);" onClick="deletecmnt(this, "'.$val['id'].'", "'.BASE_URL.'");" title="Delete Chatter">x</a>
                </span>';

```

I am receiving an error in Firefox `SyntaxError: syntax error deletecmnt(this,` but this worked up until I changed from a input text to text area.