I have to use a user control form
In that form, there is a Submit button.
That button is html button.
That button has lots of validation functions for the other controls.
Now I want to add another function of my own into that button.
Now I faced my problem. I dunno the ID of that button.
When I view source I find no ID or Name.
But I can use
<script type="text/javascript">
$("input[type=submit]").click(function () { return validateCaptcha(); })
</script>
To add my function.
If I do that, only my function would run and the other original validation functions are not running anymore.
I want to append my function at the end of its validation functions.
I found this..
JavaScript: Adding an onClick handler without overwriting the existing one from another question
But that one find the controls by tagname. If I find it by tagname there would be lots of input tags.
Is there any other way to combine the 2 answers that I found?
Tkz
If you know the name or the ID of the form you are working on you could do
or
Witout knowing the ID of the submit button or the form (or the name of either) it would be difficult to validate; you need some sort of identifier.