javascript - FORM submission gives empty form in IE browser when passed via AJAX in coldfusion -


i have 2 cfm pages, when submit 1 page via ajax in internet explorer, form structure received empty.

it working fine other browsers i.e., chrome , ff.

this issue versions of ie 9,10,11.

when submit form without ajax call, getting submitted , form too.

can help? below code ajax call.

$("form").submit(function() {                //check if form fields valid     var isvalid = validatedetails();     if (isvalid) {         $('#tab1').html('<div style="margin-top:100px;" align="center">loading ...<br/><br/><img src="/rpnet/images/ajax-loader.gif"/></div>');         $.post($(this).attr("action"), $(this).serialize(), function(data){             $("#tab1").html(data);         });         return false;     }     return false; });  <form action="/rpnet/istat/rmtconf-dev.cfm?type=4" method="post" enctype="multipart/form-data" name="editapplicant">          <input name="ap_number" type="hidden" value="<cfoutput>#url.ap_number#</cfoutput>">             <ul id="threecolumn1" class="threecolumn">                     <li>name:</li>                     <li>address:</li>                     <li>city:</li>                     <li>state:</li>                     <li>zip:</li>                     <li>daytime phone:</li>                     <li>home phone:</li>                     <li>fax:</li>                     <li>email:</li>                     <li>dob:</li>                     <li>ssn:</li>                     <li>policy / claim #:</li>                 </ul>            <cfoutput>                <ul id="threecolumn2" class="threecolumn">                         <li><cfif session.testmode eq 1>#test_name#<cfelse>#getapplicantinfo.ap_name#</cfif></li>                         <li>#getapplicantinfo.ap_pt_address#</li>                         <li>#getapplicantinfo.ap_pt_city#</li>                         <li>#getapplicantinfo.ap_pt_st#</li>                         <li>#getapplicantinfo.ap_pt_zip#</li>                         <li>#getapplicantinfo.ap_pt_dayphone#</li>                         <li>#getapplicantinfo.ap_pt_phone1#</li>                         <li>#getapplicantinfo.ap_pt_fax#</li>                         <li>#getapplicantinfo.ap_pt_email#</li>                         <li><cfif session.testmode eq 1>#dateformat(test_dob,"mm/dd/yyyy")#<cfelse>#dateformat(getapplicantinfo.ap_dob,"mm/dd/yyyy")#</cfif></li>                         <li><cfif session.testmode eq 1>#test_ssn#<cfelse>#getapplicantinfo.ap_ssn#</cfif></li>                         <li><cfif session.testmode eq 1>#test_file_number#<cfelse>#getapplicantinfo.ap_file_number#</cfif></li>                     </ul>                 </cfoutput>              <ul id="threecolumn3" class="threecolumn">                     <li><input name="name" id="name" type="text" size="30"></li>                     <li><input name="address" id="address" type="text" size="30"></li>                     <li><input name="city" id="city" type="text" size="30"></li>                     <li><input name="state" id="state" style="text-transform:uppercase;" onkeyup="this.value=this.value.replace(/[^a-za-z]/g,'');" type="text" size="5" maxlength="2"></li>                     <li><input name="zip" id="zip" type="text" size="11" maxlength="10"></li>                     <li><input name="dayphone" id="dayphone" type="text" size="30"></li>                     <li><input name="phone" id="phone" type="text" size="30"></li>                     <li><input name="fax" id="fax" type="text" size="30"></li>                     <li><input name="email" id="email"type="text" size="30"></li>                     <li><input name="dob" id="dob" type="text" size="30"></li>                     <li><input name="ssn" id="ssn" type="text" size="30"></li>                     <li><input name="policynum" id="policynum" type="text" size="30"></li>                 </ul>                 <ul>                     <li><input class="submitbutton" name="submit" type="submit" value="submit changes"><input class="submitbutton" name="clear" type="reset" id="clear" value="clear all"></li>                     <div style="clear:both;"></div>                 </ul>             </form> 

the issue resolved, solution little weird, have removed records loading code submit function , form submits fine.

below code:

$("form").submit(function() {              //check if form fields valid   var isvalid = validatedetails();   if (isvalid) {       $.post($(this).attr("action"), $(this).serialize(), function(data){           $("#tab1").html(data);       });     return false;    }   return false; }); 

why did happen idea?


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -