Calling jquery function from ascx not working
        Posted  
        
            by Metju
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Metju
        
        
        
        Published on 2010-06-11T07:25:43Z
        Indexed on 
            2010/06/11
            7:33 UTC
        
        
        Read the original article
        Hit count: 399
        
Hi Guys,
I'm having a problem with the following situation.
I have an ascx which contains a submit button for a search criteria and I am trying to call a validation function in a js file I've used throughout the site (this is the first time I'm using it in an ascx).
Now I've just tried this:
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jsAdmin_Generic_SystemValidation.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".submitBtn").click(function (e) {
            alert("test");
            alert($.Validate());
            alert("test 2");
        });
    });
</script>
The file is being referenced correctly as I am already seeing posts in Firebug that are done by it.
This is the function:
jQuery.extend({
Validate: function () {
    does validation...
});
Now at first I was getting "Validate() is not a function" in firebug. Since I did that alert testing, I am getting the first alert, then nothing with no errors.
Can anyone shed some light?
Thanks
© Stack Overflow or respective owner