I am trying to pass a string in the onClick event handler function\'s arguments of the dynamically created anchor element, see the fiddle http://jsfiddle.net/shmdhussain/bXYe4/.
perhaps instead, use a data attribute on the element to hold the string. then in the function retrieve the data.