Script with .includes works fine in Chrome but not IE
Hi,
I have a piece of JQuery Script that works fine in Chrome and Mozilla, but does not want to work in IE. I read up on it and it said that IE does not support the include function. So I tried using indexof but that made it stop work in all browsers. What can I use that will work in all browsers? I appreciate any help rendered.
- function sendCheck() {
- var valid;
- valid = validateCheck();
- if(valid) {
- jQuery.ajax({
- url: "verify_step1.php",
- data:'age='+$("#aRange").val()+'&fd='+$("#fdate").val()+'&ft='+$("#ftime").val()+'&td='+$("#tdate").val()+'&tt='+$("#ttime").val()+'&pul='+$("#floc option:selected").val()+'&dol='+$("#tloc option:selected").val(),
- type: "POST",
- success:function(data){
- $("#display").html(data);
- //if (data.indexof("Success") > -1){ // does not work in all browsers.
- if (data.includes("Success")){ // works in all browsers except IE
- setTimeout(' window.location.href = "res_step2.php"; ',2000);
- }
- },
- error:function (){}
- });
- }
- }