Im trying to add another if clause into a function. The ";" and the "{" "}"
are throwing me a bit..... any help would be appreciated.
my form submit looks like this the onsubmit executes the function onsubmitform which currently only
validates the a file was selected for uploading. I want to add another validation against a Po#
that is in a table on the iseries. Im just confused as to the "form".
the function is:
and I want to add:
Thanks in advance
are throwing me a bit..... any help would be appreciated.
my form submit looks like this the onsubmit executes the function onsubmitform which currently only
validates the a file was selected for uploading. I want to add another validation against a Po#
that is in a table on the iseries. Im just confused as to the "form".
PHP Code:
<form name="frmSend" method="POST" enctype="multipart/form-data" action="uploadTester.asp" onSubmit="return onSubmitForm();">
the function is:
PHP Code:
<script>
function onSubmitForm()
{
var formDOMObj = document.frmSend;
if (formDOMObj.attach1.value == "")
alert("Please press the browse button and pick a file.")
else
return true;
return false;
}
</script>
and I want to add:
PHP Code:
{
'now validate the PO#'
sqlstmt = "SELECT count(*) as recordfound FROM " & _
prodlib & ".PCHSPCH WHERE PHPO# = " & Upload.Form("PO#")
response.write(sqlstmt)
set recordfound = connection.Execute(sqlstmt)
if (recordfound == 0)
alert("Invalid Purchase Order Entered.")
return false;}
Comment