开发者

ajaxSubmit problem on IE 7

开发者 https://www.devze.com 2023-03-15 15:15 出处:网络
i have the following: $(\'#myForm\').validate({ groups:{ homeSize:\"width length\" }, rules: { bedrooms:{ required:true, number:true, range: [1, 5] },

i have the following:

$('#myForm').validate({
    groups:{ homeSize:"width length" },                
    rules: { bedrooms:  { required:true, number:true, range: [1, 5] },
             make: { required:true },
             bathrooms: { required:true, number:true, range: [1, 5] },
             year: { required:true, number:true, min:1950, max:2011 }
    },  
    messages: {
            bedrooms:  " Valid Number [1-5] Required!开发者_StackOverflow",
            make:      " Make is Required!",
            bathrooms: " Valid Number [1-5] Required!",
            year:      " Year is Required!"
    }, 
    errorElement: "em",

    errorPlacement: function(error, element) {
        error.appendTo(element.parent("td").find('span'));
        $('#divNewRBC').css('height','250px');      
    },  
    submitHandler: function(form){
        var options = { 
                beforeSubmit: function() {
                    $('#formSub').hide();
                    $('#formSave').show();

                },
                success: function(projectID) {
                    $('#formSub').show();
                    $('#formSave').hide();
                },
                url:'x.cfm'
        };  
        $('#myForm').ajaxSubmit(options);
    }
}); 

The x.cfm simply emails the form fields. On FireFox, I get the form fields. On IE 7, the form fields are empty. Any help?


i had two inputs down the form:

 <input type="text" name="width" id="width" value="W" class="inpAlt"/> x <input type="text" name="height" id="height" value="L" class="inpAlt"/><br/><span></span>

the names and the ids were causing the trouble. When I changed them to hWidth, hHeight, the ajaxSubmit function worked.

0

精彩评论

暂无评论...
验证码 换一张
取 消