| View previous topic :: View next topic |
| Author |
Message |
nodak
Joined: 13 Apr 2007 Posts: 14 Location: Fargo, ND
|
Posted: Apr 13, 2007 7:10 pm Post subject: Form validation on submission |
|
|
I have built a very customized app for our users and have integrated the xupload script to help with the file uploading.
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: | <script type="text/javascript" language="JavaScript">
<!--
function OnSubmitCheck() {
var formValid = Validate();
if(formValid == false) {
return false;
}
else {
StartUpload(this);
}
return true;
}
//-->
</script> |
Looking forward to hearing some suggestions. I'm using the pro version of xupload and running on IIS6.
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!  |
|
| Back to top |
|
 |
nodak
Joined: 13 Apr 2007 Posts: 14 Location: Fargo, ND
|
Posted: Apr 13, 2007 9:10 pm Post subject: |
|
|
Well I got it. So no worries!
Thanks again for an excellent script!
Forgot that this means, the form being submitted and changed it to the form name. |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Apr 16, 2007 9:26 am Post subject: |
|
|
No problems, good luck there  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|