This should be simple – I want to use a javascript variable, ‘foo’ within the .attr() element as below:
$("#readreplytxt_" + msgid).attr("onClick", "readofferclose(foo)");
I’ve tried this:
$("#readreplytxt_" + msgid).attr("onClick", "readofferclose("+ foo")");
However no joy.
How can I make this work?
Note you are missing “+” sign.