Hi All,
I've written a function in VBScript that runs as part of a web
application in IE. But, IE keeps telling me there's a syntax error.
But for the life of me I don't see it. I've marked the line
accordingly. Any help would be appreciated.
TIA.
Function EAAFOnSubmit( strAction )
addNew = 0
document.myForm.all("SALUTATION_ID").value =
document.SALUTATION_IDFrame.SALUTATION_ID.value
document.myForm.all("PRSN_TYP_CD").value =
document.PRSN_TYP_CDFrame.PRSN_TYP_CD.value
document.myForm.all("ARL_TITLE_ID").value =
document.ARL_TITLE_IDFrame.ARL_TITLE_ID.value
document.myForm.all("RANK_ID").value =
document.RANK_IDFrame.RANK_ID.value
document.myForm.all("myFormSubmitted").value = strAction
If StrComp( strAction, "Close", VBTextCompare ) <> 0 Then
If not EAAFValidate( strAction ) Then
Exit Function
End If
End If
If StrComp( strAction, "Update Record", VBTextCompare ) = 0 OR
StrComp( strAction, "Update and Close", VBTextCompare ) = 0 OR
StrComp( strAction, "Add New Record", VBTextCompare ) = 0 Then
document.myForm.submit
Exit Function
End If <<< ERROR IS HERE SUPPOSEDLY
If StrComp( strAction, "Close", VBTextCompare ) = 0 AND addNew = 1
Then
opener.document.location = document.myForm.all("capturedURL") &
"&onAddEmployee=CLOSEDELETE_" & document.myForm.all( "titleID" ).value
Else
opener.document.location = document.myForm.all("capturedURL") &
"&onAddEmployee=" & document.myForm.all( "titleID" ).value
End If
window.close
End Function