Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object does not suppor this method or property..

Status
Not open for further replies.

svsuthar1

Programmer
Jul 6, 2004
135
US
This is the entire code below... the Bold line below is where the error occures.. It's a valid code, but I think the mix of javascript and vbscript is causing this error.. I am not aware why? I added few javascript at each form line where thing are choosen from, after that this is coming up.

Any help would be appreciated.

Thanks,

Samir


<HTML><HEAD><BODY>
<!--#includes virtual="includes/commonheader.asp"-->
<LINK href="..\CSS\plone.css" type=text/css rel=stylesheet>
<SCRIPT LANGUAGE = "vbscript">
function Validate()
Dim pass
pass=true
If (((getExternal_Errors.item("Resolution").value)="") OR (Not(IsNumeric(getExternal_Errors.item("Resolution").value)))) Then
MsgBox "Resolution # is required field and must be Numeric",vbInformation,"Resolution #"
getExternal_Errors.Resolution.focus
pass=false
ElseIf (getExternal_Errors.item("ReturnDate").value)="" Then
MsgBox "Return Date is required field",vbInformation,"Return Date"
getExternal_Errors.ReturnDate.focus
pass=false
End If
Validate=pass
If Validate then
document.getExternal_Errors.submit
End If
End function
</SCRIPT>
<Script language="javascript">
function ShowDate(oDoc,cDate)
{
window.open("/includes/datepicker.asp?backf="+oDoc+"&cDate="+cDate,"window", "height=210, width=300, resizeable=no,","");
}

function resubmit()
{
document.forms[0].NavBox.value
}
</SCRIPT>
<%
'Open up a connection our access database
'we will use a DSN-less connection

Dim objConn, path, connectionstring, SQL, SQL1, SQL2, SQL3, objRSBox, objRSAsso, objRSError, objRSRoot,curRootCause
path="C:\Inetpub\
Set objConn = Server.CreateObject("ADODB.Connection")
connectionstring= "PROVIDER=MICROSOFT.JET.OLEDB.4.0;" & _
"DATA SOURCE=" & path
objConn.Open connectionstring

SQL = "Select fldBoxID, fldBoxName From tblBoxNum Order by fldBoxID ASC"

SQL1 = "SELECT tblemployees.fldAssociateID, [fldLastName] & "", "" & [fldFirstName] AS Associate " _
& "FROM tblemployees " _
& "ORDER BY tblemployees.fldLastName;"

SQL2 = "SELECT tblErrorCode.fldErrorID, tblErrorCode.fldErrorCode, tblErrorCode.fldInternal, tblErrorCode.fldErrorCategory " _
& "FROM tblErrorCode " _
& "WHERE (((tblErrorCode.fldInternal)=No));"

SQL3 = "SELECT tblArea_RootCause.fldArea_RootCauseID, tblArea_RootCause.fldRootCause, fldRootCauseID " _
& "FROM tblArea_RootCause " _
& "WHERE ((Not(tblArea_RootCause.fldRootCauseID)=4)OR(tblArea_RootCause.fldRootCauseID) = 7) " _
& "ORDER BY tblArea_RootCause.fldRootCause;"

Set objRSBox = Server.CreateObject("ADODB.Recordset")
Set objRSAsso = Server.CreateObject("ADODB.Recordset")
Set objRSError = Server.CreateObject("ADODB.Recordset")
Set objRSRoot = Server.CreateObject("ADODB.Recordset")
objRSBox.Open SQL, objConn
objRSAsso_Open SQL1, objConn
objRSError.open SQL2, objConn
objRSRoot.Open SQL3, objConn
%>

<FORM NAME=getExternal_Errors METHOD=post ACTION="saveExternal_Errors.asp"><BR>
<TABLE align=center cellSpacing=0 cellPadding=1 border=1 bordercolor="#cccccc" style="BORDER-COLLAPSE: collapse">
<TR>
<TD bgcolor=navy align=middle colspan=2><FONT color=white><B>Data-Entry External Errors</B></FONT></TD></TR>
<TR>
<TD><B>Resolution #</B></TD><TD><INPUT onKeyUp="if(this.value.length==12){document.getExternal_Errors.Associate.focus();}" id=Resolution name=Resolution size=15 maxlength=12></TD></TR>
<TR>
<TD><B>Associate</B></TD><TD><SELECT onchange="document.getExternal_Errors.ReturnDate.focus()" id=Associate name=Associate>
<%Do While Not objRSAsso.EOF%>
<OPTION value=<%=objRSAsso("fldAssociateID")%>><%=objRSAsso("Associate")%></OPTION>
<% objRSAsso.MoveNext
Loop %>
</SELECT></B></TD></TR>
<TR>
<TD><B>Return Date</B></TD><TD><INPUT onKeyUP="document.getExternal_Errors.Box.focus()" id=ReturnDate name=ReturnDate Style="text-align:center" Size=10 maxlength=10 Value=<%Response.Write Date%>>&nbsp;<A href="javascript:ShowDate('getExternal_Errors.ReturnDate',this.getExternal_Errors.ReturnDate.value)"><IMG src="..\images\help.gif" align=middle border=0></A></TD></TR>
<TR>
<TD><B>Box #</B></TD><TD><SELECT onchange="document.getExternal_Errors.ErrorID.focus()" id=Box name=Box style="WIDTH: 80px">
<%Do While Not objRSBox.EOF%>
<OPTION><%=objRSBox("fldBoxID")%></OPTION>
<% objRSBox.MoveNext
Loop %>
</SELECT></B></TD></TR>
<TR>
<TD><B>Error Code</B></TD><TD><SELECT onchange="document.getExternal_Errors.RootCauseID.focus()" name=ErrorID style="WIDTH: 110px">
<%Do While Not objRSError.EOF%>
<OPTION value=<%=objRSError("fldErrorID")%>><%=objRSError("fldErrorCode")%></OPTION>
<%objRSError.MoveNext
Loop %>
</SELECT></B></TD></TR>
<TR>
<TD><B>Root Cause</B></TD><TD><SELECT onchange="document.getExternal_Errors.Submit.focus()" id=RootCauseID name=RootCauseID>
<%Do While Not objRSRoot.EOF%>
<OPTION value=<%=objRSRoot("fldArea_RootCauseID")%>><%=objRSRoot("fldRootCause")%></OPTION>
<% objRSRoot.MoveNext
Loop %>
</SELECT></B></TD></TR></TABLE><BR></TABLE><BR><CENTER><INPUT Type=button Value=Submit Name=Submit OnClick="Validate()">&nbsp;<INPUT type=reset value=Reset></CENTER>
</FORM></BODY></HTML>
<!--#includes virtual="includes/commonheader2.asp"-->
 
Thanks guys for your help... but It does not like Name property on a button.

Samir
 
Try changing the name of the submit button to something other than 'submit'. As this is a syntax word in JavaScript, the name of the button will be confused with the submit function. Even something like 'Submit1' or 'SubmitButton' should be fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top