Im having trouble to validate my form because I'm missing a submit
button inside the form, I submit my form by another link outside the
form.


<a href="#" onclick="document.validateThis.submit(); return
false;">save</a>

<form id="validateThis" name="validateThis" method="POST" action="">
     <input type="text" name="name" value=""/>
     ...
</form>

Because I dont have a submit in my form the javascript doesnt get
triggered I suppose, when I place a submit button in my form
everything works just fine, btw the form also gets submitted when
clicking on my a href.

How can I fix this? The javascript is just the basic example

$().ready(function() {
                // validate the form when it is submitted
                $("#validateThis").validate();

        });

Reply via email to