Javascript Error
-
Hi all, I am using this code to open a new window on the lostfocus of a text box
<input class="SaveHistory" onkeypress="window.event.returnValue = BacoValidateDate(window.event.keycode)"
id="txtStartdate" onkeydown="SelectStartDate_keydown" onBlur="SelectStartDate_Blur"
title="F2 - Calendar" type="text" maxLength="10" onchange="window.InvalidFlag_StartDate.innerHTML=Empty"
size="10" name="txtStartdate" runat="server"><font size="1"> (<%= strDateStringValue%>)</font>
<script language="VBS">And
<script language="VBS">
Sub SelectStartDate_clicked
Dim curDate, calurl, d, curDate2
curDate = Baco.txtStartDate.Value
calUrl = "..\..\Calendar.asp"
If Len(curDate) > 0 Then calUrl = calUrl & "?Date=" & curDate
d = window.showModalDialog(calUrl, ,"dialogHeight:320px;dialogwidth:315px")
If Not IsEmpty(d) Then
Baco.txtStartDate.Value = d
InvalidFlag_StartDate.innerHTML = Empty
End If
End Sub
Sub SelectStartDate_keydown
If window.event.keycode=113 Then
SelectStartDate_clicked
window.event.returnValue = False
End If
End Sub
Sub SelectStartDate_Blur
If <%=Request.QueryString("Action")%> = 4 Then
window.location="Mypage.aspx?Res_Id=<%=Request.QueryString("Res_Id")%>&Cycle=" & Baco.txtCycle.value & "&SchCode=<%=Request.QueryString("SchCode")%>&Action=4&StartDate=" & Baco.txtStartDate.Value & "&sCode=" & Baco.txtSchcode.value
'Window.location="solWorkSchedule.aspx"
'window.alert("hai")
End If
End Sub
</script>But I getting the javascript error msg as "Object Doesnot support this method in the blur event". Can some one help Dana
-
Hi all, I am using this code to open a new window on the lostfocus of a text box
<input class="SaveHistory" onkeypress="window.event.returnValue = BacoValidateDate(window.event.keycode)"
id="txtStartdate" onkeydown="SelectStartDate_keydown" onBlur="SelectStartDate_Blur"
title="F2 - Calendar" type="text" maxLength="10" onchange="window.InvalidFlag_StartDate.innerHTML=Empty"
size="10" name="txtStartdate" runat="server"><font size="1"> (<%= strDateStringValue%>)</font>
<script language="VBS">And
<script language="VBS">
Sub SelectStartDate_clicked
Dim curDate, calurl, d, curDate2
curDate = Baco.txtStartDate.Value
calUrl = "..\..\Calendar.asp"
If Len(curDate) > 0 Then calUrl = calUrl & "?Date=" & curDate
d = window.showModalDialog(calUrl, ,"dialogHeight:320px;dialogwidth:315px")
If Not IsEmpty(d) Then
Baco.txtStartDate.Value = d
InvalidFlag_StartDate.innerHTML = Empty
End If
End Sub
Sub SelectStartDate_keydown
If window.event.keycode=113 Then
SelectStartDate_clicked
window.event.returnValue = False
End If
End Sub
Sub SelectStartDate_Blur
If <%=Request.QueryString("Action")%> = 4 Then
window.location="Mypage.aspx?Res_Id=<%=Request.QueryString("Res_Id")%>&Cycle=" & Baco.txtCycle.value & "&SchCode=<%=Request.QueryString("SchCode")%>&Action=4&StartDate=" & Baco.txtStartDate.Value & "&sCode=" & Baco.txtSchcode.value
'Window.location="solWorkSchedule.aspx"
'window.alert("hai")
End If
End Sub
</script>But I getting the javascript error msg as "Object Doesnot support this method in the blur event". Can some one help Dana
No Problem I have solved it. I have placed some Javascript codings in the Head Part Of the HTML. I removed it to the Bottom of the page(though it should not be done) Dana