Either use a hyperlink or button "onclick" event handler to bring the calender up. You need to pass the textbox form element to the function.
Lets say you have a form named f1, and in that form you have a textbox named t1; you would pass document.f1.t1 to the showCalender() function like this: showCalender(document.f1.t1). This is so the function knows where to get the date string from and where to put the result. Omitting this value will result in an error.
See the 2 examples below to help demonstrate this:
Form button:
<form name="form_name1">
<input type="text" size="12" value="" name="text_name1">
<input type="button" value=" ... " onclick="showCalender(document.form_name1.text_name1)">
</form>
Hyperlink:
<form name="form_name2">
<input type="text" size="12" value="" name="text_name2">
<a href="javascript:showCalender(document.form_name2.text_name2)">(Link text)</a>
</form>