Here is the snippet of code from my usercontrol.ascx file:
<
script type="text/javascript">
loadCalendar();
</
script>
<
asp:textbox id="txt_Date" Columns="6" Width=66 runat="server" CssClass="Textbox"></asp:textbox>
<asp:hyperlink id="imgCalendar" runat="server" ImageUrl="../images/smallcalendar.gif" NavigateUrl="javascript:;"></asp:hyperlink>
Here is a snippet of code from my usercontrol .ascx.vb file:
Private
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim scriptStr As String = _
"javascript:return popUpCalendar(this," & getClientID() & ", 'mm/dd/yyyy', '__doPostBack(\'" & getClientID() & "\')')"
imgCalendar.Attributes.Add(
"onclick", scriptStr)
End Sub
The master page includes the following line of code that holds the popUpCalendar function refered to in the usercontrol .ascx.vb codebehind file:
<script type="text/javascript" language="javascript" src="cal/popcalendar.js"></script>
My aspx page that uses the usercontrol does so as follows:
<
asp:Panel ID="pnlOwnerBeginDate" runat="server"><uc1:DateSelector ID="dsOwnerBeginDate" runat="server" /></asp:Panel>
Then I have a RadAjaxManager on the same .aspx page that updates the pnlOwnerBeginDate as follows:
<
radA:AjaxSetting AjaxControlID="btnSearch">
<UpdatedControls>
<radA:AjaxUpdatedControl ControlID="pnlSupplierInfo_Outer" LoadingPanelID="AjaxLoadingPanelLoad" />
<radA:AjaxUpdatedControl ControlID="pnlTop_Outer" />
<radA:AjaxUpdatedControl ControlID="pnlLabels" />
<radA:AjaxUpdatedControl ControlID="lblNew" />
<radA:AjaxUpdatedControl ControlID="lblInstructions" />
<radA:AjaxUpdatedControl ControlID="pnlOwnerBeginDate" />
</UpdatedControls>
</radA:AjaxSetting>
When btnSearch is clicked on my .aspx page, the popUpCalendar javascript function is not found. Can you help me figure out what I am missing or doing wrong?
Thanks
Jill