how to call javascript function from anchor tag which is part of a javascript string?
<p>how to call javascript function from anchor tag which is  part of a javascript string?</p>

<pre><code>var htmlVar = '&lt;span&gt; Name: ' + arNames[j] + '&lt;/span&gt;&lt;/br&gt;&lt;span&gt; Last: ' + arLast[j] + '&lt;/span&gt;&lt;br/&gt;&lt;a javascript:setProfile(\\"+ dob[j]+\\",\\"+state[j]+\\") &gt;View&lt;/a&gt;';
</code></pre>
