Netscape and .net calendar

S

SS

Hi

I am using .net Calendar control, which works fine in IE but in netscape it
shows up but
when clicking on the date does not close and does not pass date back to
calling window.

ANy help would be appreciated, please

Here is the sample code.

Public Class Calendar

Inherits System.Web.UI.Page



#Region " Web Form Designer Generated Code "



'This call is required by the Web Form Designer.

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()



End Sub

Protected WithEvents Button1 As System.Web.UI.WebControls.Button

Protected WithEvents Label1 As System.Web.UI.WebControls.Label

Protected WithEvents Calendar1 As System.Web.UI.WebControls.Calendar

Protected WithEvents control As
System.Web.UI.HtmlControls.HtmlInputHidden



'NOTE: The following placeholder declaration is required by the Web Form
Designer.

'Do not delete or move it.

Private designerPlaceholderDeclaration As System.Object



Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

InitializeComponent()

End Sub



#End Region



Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load



control.Value = Request.QueryString("textbox").ToString()

End Sub



Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Calendar1.SelectionChanged

Dim strScript As String = "<script>window.opener.document.forms(0)." +
control.Value + ".value = '"

strScript += Calendar1.SelectedDate.ToString("MM/dd/yyyy")

strScript += "';self.close()"

strScript += "</" + "script>"

RegisterClientScriptBlock("DueDateScript", strScript)

End Sub

End Class





Here is the html page



<%@ Page Language="vb" AutoEventWireup="false" Codebehind="GetDate.aspx.vb"
Inherits="LifetimeFitness.GetDate" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>

<title>GetDate</title>

<meta name="GENERATOR" content="Microsoft Visual Studio .NET
7.1">

<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">

<meta name="vs_defaultClientScript" content="JavaScript">

<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">

</HEAD>

<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">

<asp:TextBox id="txtDate" style="Z-INDEX: 101; LEFT: 8px;
POSITION: absolute; TOP: 32px" runat="server"></asp:TextBox>

<a href="javascript:;"
onclick="window.open('Calendar.aspx?textbox=txtDate','cal','width=225,height
=210,left=270,top=180')">

<img src="images/SmallCalendar.gif" border="0"> </a>

</form>

</body>

</HTML>



Thx



SS
 
M

Martin Honnen

SS said:
Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Calendar1.SelectionChanged

Dim strScript As String = "<script>window.opener.document.forms(0)." +
control.Value + ".value = '"

Make that at least

"<script
type=""text/javascript"">window.opener.document.forms[0].elements['" +
control.Value + "'].value = '"

of course all on one line.
 
S

SS

Thx Martin that worked

SS

Martin Honnen said:
Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Calendar1.SelectionChanged

Dim strScript As String = "<script>window.opener.document.forms(0)." +
control.Value + ".value = '"

Make that at least

"<script
type=""text/javascript"">window.opener.document.forms[0].elements['" +
control.Value + "'].value = '"

of course all on one line.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top