How to make string pass from onclick to a function? : <p>My string is like this</p>

<pre><code>sakjgbsd aksdg's ad asidg's iasudgbsb
</code></pre>

<p>but when i print the string in function it prints only</p>

<pre><code> sakjgbsd aksdg
</code></pre>

<p>the part after (') is not printing</p>

<p>here is how i send data</p>

<pre><code>&lt;a href='#' data-status='" + data[i][col[j]] + "' " +
                            "onclick='submit(this)'&gt;Click Here&lt;/a&gt;
</code></pre>

<p>here is Function</p>

<pre><code>function submit(str) 
{
var status = $(str).attr("data-status");
alert(status)
}
</code></pre>
