the problem was that quotes needed to be added around the code to pass the activity name.
document.getElementById(\'WADADeleteRecordName\').innerHTML=\'' . rawurlencode($keyword['Activity']).'\'
after adding those quotes, I was able to delete the record.