Try this:

 $('#searchButton').click(function(){
          if ($('#testBlog').valid())
               formDoAjaxSubmit();
       });

Jörn

On Wed, Aug 12, 2009 at 8:04 PM, Rockinelle<ericbles...@gmail.com> wrote:
>
> I am walking into an existing form that uses a custom ajax request to
> display search results at the button of the page. This is triggered by
> clicking a form button. I want to trigger the validation on this same
> click event rather than a submit event. I am just using basic
> validation at the moment.
>
>
> <script type="text/javascript" charset="utf-8">
> $(document).ready(function(){
>        $('#testBlog').validate();
>
>        $('#searchButton').click(function(){
>                formDoAjaxSubmit();
>        });
> });
> </script>
>
> <form id="testBlog" name="testBlog">
>        <select name="catSelectList" id="catSelectList" class="required"
> title="Please Select a Category" style="width:610px" >
>                <option>....</option>
>                <option>....</option>
>                <option>....</option>
>                <option>....</option>
>         </select>
>         <input type="button" value="Submit this Query!"
> id="searchButton">
> </form>
>

Reply via email to