Unable to load the Javascript calendar on Href by using Jquery function 
<p>I have my function as follows</p>

<pre><code> &lt;script type="text/javascript"&gt;
$(function() {
$('#ctl00_ContentPlaceHolder1_TextBox2').datepick();
});

function showDate(date) {
//alert('The date chosen is ' + date);
}
&lt;/script&gt;
</code></pre>

<p>I need this to be called when i click on <code>Href</code> tag </p>

<pre><code>&lt;a onclick="" href="#"&gt;


Metaforce as per you said i tried this 



&lt;script type="text/javascript"&gt;
$(function click() {
    $('#ctl00_ContentPlaceHolder1_TextBox2').datepick();
});

function showDate(date) {
    //alert('The date chosen is ' + date);
}
    &lt;/script&gt;

  &lt;a onclick="return click();" href="#"&gt;

    &lt;img alt="cal" src="calendar.gif" style="vertical-align: text-bottom;" border="0" /&gt;&lt;/a&gt;
</code></pre>

<p>In <code>onclick</code> i have to call that how can i any help please</p>

<p><code>Patrick Kaufmann and Phillip Kovalev</code> as per your said i write as follows</p>

<pre><code>    &lt;script type="text/javascript"&gt;
function showDate(date) {
  //alert('The date chosen is ' + date);
}

$(function() {
  $('#ctl00_ContentPlaceHolder1_TextBox2').datepick();

  // assign anonimous function as event handler and call showdate from it 
  $('#clickOnIt').click( function() {
    showDate( $(this).val() );
  } );
});
&lt;/script&gt;

&lt;asp:TextBox ID="TextBox2" runat="server"&gt;&lt;/asp:TextBox&gt;
 &lt;a href="#" id="clickOnIt"&gt;click me&lt;/a&gt;
</code></pre>

<p>But i am not getting the desired calendar</p>
