Browse Source

fix - JIRA id NI-8090 resolved ie validation api error handled

main
khanshanawaz10 10 months ago
parent
commit
47b408fb49
1 changed files with 35 additions and 26 deletions
  1. +35
    -26
      index.html

+ 35
- 26
index.html View File

@ -152,7 +152,13 @@
max-width: 400px;
width: 100%;
}
#validation-class{
margin: inherit;
font-size: 14px;
text-align: left;
color: #fa3246;
font-weight: 400;
}
h1 {
margin-bottom: 1.5rem;
color: black;
@ -1163,7 +1169,7 @@ input[type=number]::-webkit-outer-spin-button {
<input type="number" type="tel"onKeyPress="if(this.value.length==10) return false;" autocomplete="tel" class="lp-form-react__input js-input-mapping" id="input-PhoneNo"
data-url="" placeholder="Phone Number" name="input-PhoneNo" required="" value="" /></label><label
for="" class="lp-form-react__error lp-form-react__error--required"><i
class="fa fa-exclamation-circle"></i><span>Please enter your Phone
class="fa fa-exclamation-circle"></i><span>Please enter your valid Phone
Number</span></label><label for="" class="lp-form-react__error lp-form-react__error--invalid"><i
class="fa fa-exclamation-circle"></i><span>Please enter a valid Phone
Number</span></label>
@ -1206,6 +1212,7 @@ input[type=number]::-webkit-outer-spin-button {
</div>
</div>
<div class="arn-non-arn" onclick="handlehideARN()" style="cursor: pointer;font-size: 13px;margin-bottom: 5px;">Click here if you don’t have ARN Number</div>
<span id="validation-class"></span>
</div>
<!-- <div
@ -1652,7 +1659,8 @@ input[type=number]::-webkit-outer-spin-button {
function formSubmit(e) {
e.preventDefault(); //This will prevent the default click action.
var iserror = 0;
let validationMsg = document.getElementById('validation-class');
validationMsg.textContent = ""
var params = new URLSearchParams(window.location.search);
var element = document.getElementById("grow-income");
// element.value = "Processing...";
@ -1672,7 +1680,7 @@ input[type=number]::-webkit-outer-spin-button {
}
var phoneno = $("#input-PhoneNo").val();
var re = /^\d{10}$/;
var re = /^[7-9][0-9]{9}$/;
if (phoneno == "" || !re.test(phoneno)) {
$("#Phone-Block").addClass("js-required");
@ -1755,30 +1763,31 @@ input[type=number]::-webkit-outer-spin-button {
data: data,
processData: false,
contentType: "application/json",
success: function (data) {
success: function (data) {
element.value = "JOIN NIVESH";
element.style.webkitTransform = element.style.webkitTransform;
//$('#grow-income').text("Thank You");
//$('#grow-income').prop("disabled", false);
console.log(data, 'KOODODOKDOOKDODOKDOK');
handleWebLead()
sendOTP()
// Simulating an email for demonstration
const emailSpan = document.getElementById('contact-det');
emailSpan.textContent = $("#input-PhoneNo").val();
$(document).ready(function () {
$(".dialog-button").trigger("click");
});
// fbq("track", "Lead");
var t = new Date().getTime();
while (new Date().getTime() < t + 2000);
// window.location.assign(
// "https://app.nivesh.com/partner_onboarding/sign_in?MobileNo=" +
// phoneno +
// "&RoleId=3"
// );
//window.location.assign("https://lead.nivesh.com/thank-you-nivesh");
//window.location.href = "https://app.nivesh.com/thank-you";
let{Message,Result,Status}=data
if(Status=="error"){
let validationMsg = document.getElementById('validation-class');
validationMsg.textContent = Message
}
else {
//$('#grow-income').text("Thank You");
//$('#grow-income').prop("disabled", false);
console.log(data, 'KOODODOKDOOKDODOKDOK');
handleWebLead()
sendOTP()
// Simulating an email for demonstration
const emailSpan = document.getElementById('contact-det');
emailSpan.textContent = $("#input-PhoneNo").val();
$(document).ready(function () {
$(".dialog-button").trigger("click");
});
// fbq("track", "Lead");
var t = new Date().getTime();
while (new Date().getTime() < t + 2000);
}
},
error: function () {
//alert('There was an error submitting the form');


Loading…
Cancel
Save

Powered by TurnKey Linux.