Spry validate not working with Pure ASP Upload
Using Spry with Pure ASP Upload
Question
I am trying to use Pure ASP Upload 3 and have a spry validation. I cannot get the validation to work.
Answer
The issue is that the Pure ASP Upload onSubmit code is overriding the Spry validation call.
Solution:
Change the Form onsubmit from:
onSubmit="<%=pau.submitCode()%>;return
document.MM_returnValue">
to:
onsubmit="if
(Spry.Widget.Form.validate(this)) {<%=pau.submitCode()%>;return
document.MM_returnValue} else return false;"
Basically, it says 'if
the form's valid, run the upload code, otherwise return false (which
cancels the submit).
Comments
Be the first to write a comment
You must me logged in to write a comment.