Document.location.href working fine on Windows(Chrome) but not working on safari

Hi i make a form ( you can get form from GET A FREE POLICY button) and add some custom JavaScript in the form to extract the form data and submit it to some URL the issue is form working fine get data in the form and send it to email and then transfer the form data to that URL in the code. But in safari or any IOS browser the form is not get submit but it pass data on URL

I debug the code and found problematic statement in it document.location.href

this is JS code that it add

<script>
 document.getElementById("save1").onclick = function formJS() {
    var a = document.getElementById('Your-Name22').value;
    var b = document.getElementById('Email22').value;
    var c = document.getElementById('Company-Name-322').value;
    var d = document.getElementById('Industry22').value;
    var e = document.getElementById('States22').value;
    var f = document.getElementById('No-of-Employees22').value;
   var  url = 'https://nik477984.typeform.com/to/DTAD7ZPz#company='+c+'&size='+f+'&state='+e+'&name='+a+'&email='+b+'&industry='+d;
    document.location.href = url ;
}


</script>

Whats the issue here i am not getting it plz help . All code is error free .Thanks

https://preview.webflow.com/preview/enatic-website-v1?utm_medium=preview_link&utm_source=designer&utm_content=enatic-website-v1&preview=fd260f3af5119568e5edf3c88b000d75&mode=preview

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.