Javascript:Undefined不是函数错误

I have a bit of javascript that I am trying to untangle, it's on a PHP form to calculate mortgage repayments, but clicking the calculate button does nothing.

Looking at Chrome Console I get the message

Uncaught TypeError: Undefined is not a function" on line 10($("#form_7") to 19

of the following code.

<script type="text/javascript">
    $(document).ready(function() {
        $("a.ActiveButton").bind({
            mousedown:function(){
                if ($(this).attr('disabled') === undefined ) 
                    $(this).addClass('Activated');
            }, 
            mouseleave:function(){ 
                if ($(this).attr('disabled') === undefined ) 
                    $(this).removeClass('Activated');
            }, 
            mouseup:function(){ 
                if ($(this).attr('disabled') === undefined ) 
                    $(this).removeClass('Activated');
            }
        });

        $("#form_7").validate({ 
            onkeyup: false, 
            showErrors: function(errorMap, errorList) { 
                if (errorList.length) alert(errorList[0].message); 
            }, 
            onclick: false, 
            rules: { 
                'Property_Price': { number: true } , 
                'Deposit': { number: true } , 
                'Duration': { number: true } , 
                'InterestRate': { number: true }  
            }, 
            onfocusout: false, 
            messages: { 
                'Property_Price': { number: "Please enter the property purchase price." } , 
                'Deposit': { number: "Please enter your deposit amount or 0 if there is no deposit." } , 
                'Duration': { number: "Please enter the duration of the mortgage." } , 
                'InterestRate': { number: "Please enter the mortgage interest rate." }  
            } 
        });

        $('#btn_4').click( function(){validate_form_7( form_7 )});
    });
</script>

Does anyone know what is causing this error and how it can resolved?

The answer is that your code is trying to dereference as a function something, that isn't one.

Try enabling stop-on-exception mode in your browser and see what "function" your code is trying to call when it crashes. Once you have a stack trace, it will be easier both for you to figure out, and for us to help.

Off-hand, I do not see any issues with the provided code.

It looks like you don't have validate defined.