1 Attachment(s)
Microsoft JScript runtime error: Object expected
i m getting an error when i click on java script calender ,here is the code snippet and image where its showing an error
Code:
<div>
<asp:UpdatePanel ID="UpdatePane5" runat="server" UpdateMode=conditional>
<ContentTemplate>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" align="left"><strong> Do you need Pick and Drop Service </strong></td>
<td width="50%" align="left"><strong></strong>
<asp:RadioButtonList EnableViewState=true RepeatDirection=Horizontal ID="rdbtn_pickDrop"
runat="server" AutoPostBack="True">
<asp:ListItem Value="0">Yes</asp:ListItem>
<asp:ListItem Selected="True" Value="1">No</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
</table>
<div runat=server visible=false id="pick_drop_div" style="border:dotted 1px black;">
<asp:UpdatePanel ID="UpdatePanel5" runat="server">
<ContentTemplate>
<asp:PlaceHolder ID=placeholder4 runat=server ><strong>Arrival Information</strong><br /><br />
Flight No.<asp:TextBox ID="txt_flightno" runat="server"></asp:TextBox>Airline
<asp:TextBox ID="txt_Airline" runat="server"></asp:TextBox>
Arrival Date:
<asp:TextBox ID="txt_arrival_date" Enabled =false runat="server"></asp:TextBox>
<a href="javascript:calendar_window=window.open('calendar.aspx?form1=form1.txt_arrival_date','calendar_window','width=554,height=488');calendar_window.focus()">
<img alt="" src="images/calendar.png" />
</a>
<br />
<br />
<strong>Departure Information:</strong><br /><br />
Flight No.<asp:TextBox ID="txt_dept_flight_no" runat="server"></asp:TextBox>Airline
<asp:TextBox ID="txt_departure_airline" runat="server"></asp:TextBox>
Departure Date:
<asp:TextBox ID="txt_departure_date" Enabled =false runat="server"></asp:TextBox>
<a href="javascript:calendar_window=window.open('calendar.aspx?form1=form1.txt_departure_date','calendar_window','width=554,height=488');calendar_window.focus()">
<img alt="" src="images/calendar.png" />
</a>
</asp:PlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="spous_atend_Conference" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</div>
Re: Microsoft JScript runtime error: Object expected
The "Object expected" error usually occurs when you try to do an operation on an object that doesn't exist or is null.
I don't see the relevant code in your snippet to be able to help (need to see the showtext() function, and possibly more markup).
Re: Microsoft JScript runtime error: Object expected
well i put that problem in pending for few days ,can u please tell me how to put validation that selected date should not less than current data in jaavscript calnder
Code:
Arrival Date:
<asp:TextBox ID="txt_arrival_date" runat="server"></asp:TextBox>
<a href="javascript:calendar_window=window.open('calendar.aspx?form1=form1.txt_arrival_date','calendar_window','width=554,height=488');calendar_window.focus()">
Re: Microsoft JScript runtime error: Object expected
and here is calender.aspx