I'm using the onclick event to populate an input tag dynamically, the onclick is constructed server side with database values. It works great until the value I'm passing contains an apostrophe. The function never fires because the delimiters in the HTML conflict. Any help appreciated.
<span onclick='putHName("DANCER'S CALL");'>
DANCER'S CALL
</span>
function putHName(hname) {
document.getElementById("HorseName").value=hname;
document.getElementById('HorseName').focus();
}