html - iOS AJAX Post "not working" -


here problem. have unifi access point, gives customer ability use our wifi. splash page asks user enter name , email. posts google form, saves information spreadsheet. works on except iphones. iphone goes straight aol.com after user enters information. gives them internet access not post form info spreadsheet.

<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en"   "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <meta name="viewport" content="width=device-width, initial-scale=1">   <title>classic city computing, inc.</title>    <link rel="stylesheet" type="text/css" href="<unifi url="css/bootstrap.min.css"/>" />   <link rel="stylesheet" type="text/css" href="<unifi url="css/stylesheet.min.css"/>" />   <!-- html5 shim , respond.js ie8 support of html5 elements , media queries -->     <!-- warning: respond.js doesn't work if view page via file:// -->     <!--[if lt ie 9]>         <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>         <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>     <![endif]-->   <script type="text/javascript" src="<unifi url="js/jquery.min.js"/>"></script>   <script type="text/javascript" src="<unifi url="js/guest.js"/>"></script>   <script type="text/javascript" src="<unifi url="js/bootstrap.min.js"/>"></script>   <!-- <script type="text/javascript" src="<unifi url="js/ajax.min.js"/>"></script> --> </head>  <body class="login-page">     <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">         <div class="container">             <div class="navbar-header">                 <div class="navbar-brand"><img src="images/logo_263x117.png"></div>             </div>         </div>     </nav>      <!-- page content -->     <div class="container">         <div class="row">             <div class="col-md-6 col-sm-12 top_bot_spacer">                 <picture>                     <img                     sizes="(max-width: 680px) 100vw, 680px"                     srcset="                     images/office_building_y8e0ob_ar_1_1,c_fill__c_scale,w_200.png 200w,                     images/office_building_y8e0ob_ar_1_1,c_fill__c_scale,w_350.png 350w,                     images/office_building_y8e0ob_ar_1_1,c_fill__c_scale,w_463.png 463w,                     images/office_building_y8e0ob_ar_1_1,c_fill__c_scale,w_483.png 483w,                     images/office_building_y8e0ob_ar_1_1,c_fill__c_scale,w_680.png 680w"                     src="images/office_building_y8e0ob_ar_1_1,c_fill__c_scale,w_680.png"                     alt="classic city computing, inc." class="img-responsive border_pic">                 </picture>             </div>             <div class="col-md-6 col-sm-12 top_spacer">                 <div>                     <h2>welcome classic city computing, inc.</h2>                     <p>our office pleased offer <em>free</em> wifi internet access our customers.</p>                 </div>                 <form action="login" method="post" name="ajaxform" id="ajaxform" target="_self">                     <div class="form-group">                         <input type="text" name="entry.1695384387" value="" class="form-control" id="entry_2089228670" dir="auto" aria-label="first name  " title="" required placeholder="first name">                     </div>                     <div class="form-group">                         <input type="text" name="entry.1159332327" value="" class="form-control" id="entry_444646544" dir="auto" aria-label="last name  " title="" required placeholder="last name">                     </div>                     <div class="form-group">                         <input type="text" name="entry.790568677" value="" class="form-control" id="entry_1742184287" dir="auto" aria-label="email address  " title="" required placeholder="email address">                     </div>                     <br>                     <input type="hidden" name="draftresponse" value="[,,&quot;-6998185097431954589&quot;]">                     <input type="hidden" name="pagehistory" value="0">                     <input type="hidden" name="fvv" value="0">                     <input type="hidden" name="fbzx" value="-6998185097431954589">                     <input name="connect" type="submit" id="connect" class="btn btn-primary" value="submit" >                 </form>             </div>         </div>         <!-- /.row -->     </div>     <!-- /.container -->      <footer class="navbar-inverse navbar-fixed-bottom">         <div class="text-center">&copy;2016 rights reserved</div>     </footer>  <script type="text/javascript"> jquery(document).ready(function() {     jquery('input').keypress(function(e) {         var code = (e.keycode ? e.keycode : e.which);         if ( (code==13) || (code==10)) {             jquery(this).blur();             return false;         }     }); }); </script>  <script> $("#ajaxform").submit(function(e) {   // alert("test");     var postdata = $(this).serializearray();     //var formurl = $(this).attr("action");     var first = $('#entry.1695384387').val();     var last = $('#entry.1159332327').val();     var email = $('#entry.790568677').val();      if ((first !== "") && (last !== "") && (email !== "")) {         $.ajax({             url: "https://docs.google.com/forms/d/xxx/formresponse",             data: postdata,             crossdomain: true,             type: "post",             datatype: "xml",             statuscode: {                 0: function () {                     //success                     $.ajax({                         url: "https://docs.google.com/forms/d/xxx/formresponse",                         data: postdata,                         crossdomain: true,                         type: "post",                         datatype: "xml",                         timeout: 5000,                         statuscode: {                             0: function () {                                 //success                                 window.location.replace("http://www.aol.com");                             },                             200: function () {                                 //success                                 window.location.replace("http://www.reddit.com");                             }                         }                     });                 },                 200: function () {                     //success                     window.location.replace("http://www.reddit.com");                 }             }         });     } else {         //fail         window.location.replace("fail.html");     }     // e.preventdefault(); }); </script>  </body> </html> 


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -