M
msch-prv
I created a pop-up window using the ASP.NET 2.0 calendar in a distinct
file (calpopup.aspx). The calendar pops up when clicking on a
linkbutton and copies the selected day back into the textbox. This
works fine in IE.
In Firefox however, while the calendar is displayed correctly, the date
is not copied back. The console javascript reports the error:
'window.opener.document.forms is not a function'.
How can I trick FF into executing the script? Thanks for any advice,
Mark
Event that fires after a day is clicked (calpopup.aspx):
Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim cs As ClientScriptManager = Page.ClientScript
Dim cstype As Type = Me.GetType()
Dim cskey As String = "Test-CalPopup"
Dim strScript As String =
"<script>window.opener.document.forms(0)." + control.Value + ".value =
'"
strScript += calDate.SelectedDate.ToString("dd/MM/yy")
strScript += "';self.close()"
strScript += "</" + "script>"
If Not
ClientScript.IsClientScriptBlockRegistered("Test-CalPopup") Then
cs.RegisterClientScriptBlock(cstype, cskey, strScript)
End If
End Sub
file (calpopup.aspx). The calendar pops up when clicking on a
linkbutton and copies the selected day back into the textbox. This
works fine in IE.
In Firefox however, while the calendar is displayed correctly, the date
is not copied back. The console javascript reports the error:
'window.opener.document.forms is not a function'.
How can I trick FF into executing the script? Thanks for any advice,
Mark
Event that fires after a day is clicked (calpopup.aspx):
Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim cs As ClientScriptManager = Page.ClientScript
Dim cstype As Type = Me.GetType()
Dim cskey As String = "Test-CalPopup"
Dim strScript As String =
"<script>window.opener.document.forms(0)." + control.Value + ".value =
'"
strScript += calDate.SelectedDate.ToString("dd/MM/yy")
strScript += "';self.close()"
strScript += "</" + "script>"
If Not
ClientScript.IsClientScriptBlockRegistered("Test-CalPopup") Then
cs.RegisterClientScriptBlock(cstype, cskey, strScript)
End If
End Sub