Snib,
Thanks, for the input. However, it doesn't quite do the trick. I'm using VBScript, as I'm more familiar with VBS, than
JS. But, it should work the same. This is what I did:
<SCRIPT Language=VBScript>
Function OBForm_OnSubmit(btnNum)
If btnNum = 1 Then
'Run validation script.
End if
End Function
</SCRIPT>
<input type="submit" value="Save Data" name="OBBtn_Save" onclick=obform_onSubmit(1)>
<input type="submit" value="View Related Documents" name="OBBtn_CrossReference" onclick=obform_onSubmit(2)>
However, it would act as expected at first. Then, it would still trigger the OnSubmit event for the form, without an argument and would give a Type Mismatch '[string]: "[object]"]' error.
Here is what I finally found to work (again, using VBScript):
<SCRIPT Language=VBScript>
Function OBForm_OnSubmit()
'This is not really needed any more.
End Function
Function OBBtn_Save_OnClick()
'Validation code here that returns a true/false.
End Function
</SCRIPT>
<FORM Name=OBForm>
<input type="submit" value="Save Data" name="OBBtn_Save">
<input type="submit" value="View Related Documents" name="OBBtn_CrossReference">
</FORM>
It turned out to be far simpler than I thought. Thanks, again.
Chris