Click to See Complete Forum and Search --> : Calendar Control : Populate a text box


matu
July 9th, 2003, 05:05 PM
I have a Pop Up Calendar and it shows up in a WebForm.I click a date on it and it is supposed to take the clicked date and enter it into the Text Box on another Webform.I do the following ::

<script language="vb" runat="server">

Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
Dim strjscript As String = "<script language=""javascript"">"

strjscript &= "window.opener." & _
HttpContext.Current.Request.QueryString("formname") & ".value = '" & _
Calendar1.SelectedDate & "';window.close();"
strjscript = strjscript & "</script" & ">" 'Don't Ask, Tool Bug
ORDERENTRY.TextBox1.Text = strjscript 'Set the literal control's text to the JScript code

End Sub

</script>

and a Tag in the body part of HTML


<asp:calendar id="Calendar1" style="Z-INDEX: 101; LEFT: 24px; POSITION: absolute; TOP: 25px" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" ForeColor="#C00000" Height="187px" Width="222px" BackColor="#E0E0E0">

ORDERENTRY is the name of the WebForm which has the TextBox supposed to get the date.
when i build the program it tells me that ORDERENTRY is not declared.How can i eliminate this problem.How can the code in One Webform access the Control in another Webform.I think that is the issue here?
help!!!!!!!!!!

matu