I want to be able to get only the contents of a div instead of loading the full page.
My current js is:
    $(document).ready(function(){
    $("#myform").validate({
        debug: false,
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            }
        },
        messages: {
            name: "Please let us know who you are.",
            email: "A valid email will help us get in touch with you.",
        },
        submitHandler: function(form) {
            $.post('file.php', $("#myform").serialize(), function(data) {
                $('#results').html(data);
            });
        }
    });
});
It's loading the whole page when I submit the form, I want it to only load the contents of one div.
 
     
    