HI,

Code JavaScript:
var titlea = document.createElement('a');
    titlea.id = 'list_' + count;
    titlea.href = '/results.php?' + articleid;
    var txt = document.createTextNode('select....');
    titlea.appendChild(txt);
    con.appendChild(titlea);

I have this code. I've created an a tag with with a href and id attribute. I also need to add some javascript:

onclick="replaceParent();"

I've googled for a solution but can't find an answer....how do i do this?