jQuery validation error on IE8 -



jQuery validation error on IE8 -

i'm getting 'object doesn't back upwards method or property' error on ie8. line of code referring below:

$('#example-advanced-form').ajaxform({ target: '.success', success: function() { $('.success').fadein('fast'); $("#contact_form").toggle("fast"); } });

the reason using because formdata not work below ie10.

here screenshot of error:

here total script...

<script type="text/javascript"> var form = $("#example-advanced-form").show(); $('#role').validate({ // initialize plugin rules: { role: { required: true, } } }); form.steps({ headertag: "h3", bodytag: "fieldset", transitioneffect: "slideleft", onstepchanging: function (event, currentindex, newindex) { // allways allow previous action if current form not valid! if (currentindex > newindex) { homecoming true; } // needed in cases if user went (clean up) if (currentindex < newindex) { // remove error styles form.find(".body:eq(" + newindex + ") label.error").remove(); form.find(".body:eq(" + newindex + ") .error").removeclass("error"); } form.validate().settings.ignore = ":disabled,:hidden"; homecoming form.valid(); }, onstepchanged: function (event, currentindex, priorindex) { // if (currentindex === 2 && $("input:radio[name='workfor']").is(":checked")) { form.steps("next"); } }, onfinishing: function (event, currentindex) { form.validate().settings.ignore = ":disabled"; homecoming form.valid(); }, onfinished: function (event, currentindex) { if(navigator.appversion.indexof("msie 8.")!=-1 || navigator.appversion.indexof("msie 9.")!=-1) { //alert("old ie!"); // bind 'myform' , provide simple callback function $('#example-advanced-form').ajaxform({ target: '.success', success: function() { $('.success').fadein('fast'); $("#contact_form").toggle("fast"); } }); } else { //alert("not old ie!"); //data sent server var m_data = new formdata(); m_data.append( 'name', $('input[name=name]').val()); m_data.append( 'number', $('input[name=number]').val()); m_data.append( 'email', $('input[name=email]').val()); m_data.append( 'workfor', $('input[name=workfor]:checked').val()); m_data.append( 'role', $('select[name=role]').val()); m_data.append( 'cv', $('input[name=cv]')[0].files[0]); m_data.append( 'coverletter', $('textarea#coverletter').val()); //instead of $.post() using $.ajax() //that's because $.ajax() has more options , flexibly. $.ajax({ url: 'contact_me.php', data: m_data, processdata: false, contenttype: false, type: 'post', datatype:'json', success: function(response){ //load json info server , output message if(response.type == 'error'){ //load json info server , output message output = '<div class="error">'+response.text+'</div>'; }else{ output = '<div class="success">'+response.text+'</div>'; $("#contact_form").toggle("fast"); } $(".form_message").hide().html(output).slidedown(); } }); }//end browser check coniditonal statement } }).validate(); </script>

$.ajaxform not standard method jquery; likely, script referencing add together on failing, or in wrong order. if failing, name or location script file wrong, or error occurring on page, or in plugin, that's causing it. using debugging tool help identify issue (ie's developer toolkit, firefox firebug, chrome it's dev tools or firebug).

jquery validation internet-explorer-8

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -