Everything is working great, except I need to call a javascript I wrote to check the additional fields I'm gathering data from for valid info prior to submitting it for upload.
Since xupload uses the onsubmit call looking for a returned value, I wrote another function to submit the form, first calling my validation script and if it passes, then call the upload script.
Unfortunately it won't execute the upload. I'm looking for some ideas on how to make this work.
The function I'm using to submit the form is:
Code: Select all
<script type="text/javascript" language="JavaScript">
<!--
function OnSubmitCheck() {
var formValid = Validate();
if(formValid == false) {
return false;
}
else {
StartUpload(this);
}
return true;
}
//-->
</script>
I'm very impressed with the script so far, you've done great work with it. I'm using it to gather data and upload image files through a PHP script and then resize the image files on the server, rename them, AND overlay text from the form.
Without this script I'd still be banging my head against the wall looking for a way for our users to track the file upload progress!