I have my function as follows
<script type="text/javascript">
$(function() {
$('#ctl00_ContentPlaceHolder1_TextBox2').datepick();
});
function showDate(date) {
//alert('The date chosen is ' + date);
}
</script>
I need this to be called when i click on Href tag
<a onclick="" href="#">
Metaforce as per you said i tried this
<script type="text/javascript">
$(function click() {
$('#ctl00_ContentPlaceHolder1_TextBox2').datepick();
});
function showDate(date) {
//alert('The date chosen is ' + date);
}
</script>
<a onclick="return click();" href="#">
<img alt="cal" src="calendar.gif" style="vertical-align: text-bottom;" border="0" /></a>
In onclick i have to call that how can i any help please
Patrick Kaufmann and Phillip Kovalev as per your said i write as follows
<script type="text/javascript">
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() );
} );
});
</script>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<a href="#" id="clickOnIt">click me</a>
But i am not getting the desired calendar
if
<a/>has an uniqueidorclassattribute you can assign event in your javascript: