K
KatB
Hi, I have a web control (ucTickets) in an asp.net page (MasterPage).
From ucTickets, I open a calendar popup window to which I pass a
control.value (which textbox to fill with the date).
I've always used a change event in the calendar aspx as follows:
Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim strScript As String = "<script>window.opener.document.Form(0)." +
control.Value + ".value = '"
strScript += calDate.SelectedDate.ToString("MM/dd/yyyy")
strScript += "';self.close()"
strScript += "</" + "script>"
RegisterClientScriptBlock("anything", strScript)
End Sub
I know the problem is with the reference back to the (window.opener)
form, but don't know how to fix it. The textbox now resides in a control
in the form. I've tried different variations with no luck.
Any suggestions much appreciated.
Thanks, Kat
From ucTickets, I open a calendar popup window to which I pass a
control.value (which textbox to fill with the date).
I've always used a change event in the calendar aspx as follows:
Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim strScript As String = "<script>window.opener.document.Form(0)." +
control.Value + ".value = '"
strScript += calDate.SelectedDate.ToString("MM/dd/yyyy")
strScript += "';self.close()"
strScript += "</" + "script>"
RegisterClientScriptBlock("anything", strScript)
End Sub
I know the problem is with the reference back to the (window.opener)
form, but don't know how to fix it. The textbox now resides in a control
in the form. I've tried different variations with no luck.
Any suggestions much appreciated.
Thanks, Kat