[{"command":"settings","settings":{"pluralDelimiter":"\u0003","ajaxPageState":{"libraries":"clientside_validation_jquery\/cv.jquery.ckeditor,clientside_validation_jquery\/cv.jquery.ife,clientside_validation_jquery\/cv.jquery.validate,clientside_validation_jquery\/jquery.validate.additional,core\/drupal.dialog.ajax,core\/jquery.form","theme":"gavias_comely","theme_token":null},"ajaxTrustedUrl":{"form_action_p_pvdeGsVG5zNF_XLGPTvYSKCf43t8qZYSwcfZl2uzM":true,"\/CitizenPortalApplication-Dahod\/index.php\/en\/user\/mobile_verification?ajax_form=1":true},"gavias_blockbuilder":{"url_edit":"\/CitizenPortalApplication-Dahod\/index.php\/en\/admin\/structure\/gavias_blockbuilder\/edit\/-----"},"ajax":{"verify-Otp":{"callback":[{},"submitMobileVerificationAjax"],"event":"click","url":"\/CitizenPortalApplication-Dahod\/index.php\/en\/user\/mobile_verification?ajax_form=1","dialogType":"ajax","submit":{"_triggering_element_name":"op","_triggering_element_value":"Submit"}}},"user":{"uid":0,"permissionsHash":"967fb4533eca151a6f168ebd805b56a33ae06f3fe0c8a593f5afcff20a9ab886"}},"merge":true},{"command":"add_css","data":"\u003Clink rel=\u0022stylesheet\u0022 href=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/themes\/base\/core.css?spajq1\u0022 media=\u0022all\u0022 \/\u003E\n\u003Clink rel=\u0022stylesheet\u0022 href=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/themes\/base\/button.css?spajq1\u0022 media=\u0022all\u0022 \/\u003E\n\u003Clink rel=\u0022stylesheet\u0022 href=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/themes\/base\/resizable.css?spajq1\u0022 media=\u0022all\u0022 \/\u003E\n\u003Clink rel=\u0022stylesheet\u0022 href=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/themes\/base\/dialog.css?spajq1\u0022 media=\u0022all\u0022 \/\u003E\n\u003Clink rel=\u0022stylesheet\u0022 href=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/themes\/base\/theme.css?spajq1\u0022 media=\u0022all\u0022 \/\u003E\n"},{"command":"insert","method":"append","selector":"body","data":"\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/domready\/ready.min.js?v=1.0.8\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery\/jquery.min.js?v=3.2.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery-once\/jquery.once.min.js?v=2.2.0\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/drupalSettingsLoader.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/drupal.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/drupal.init.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/data-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/disable-selection-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/form-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/labels-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/jquery-1-7-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/scroll-parent-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/tabbable-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/unique-id-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/version-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/focusable-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/ie-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/keycode-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/plugin-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/safe-active-element-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/safe-blur-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/widget-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/progress.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/modules\/responsive_image\/js\/responsive_image.ajax.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/ajax.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/debounce.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/displace.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/widgets\/button-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/widgets\/mouse-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/widgets\/draggable-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/position-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/widgets\/resizable-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery.ui\/ui\/widgets\/dialog-min.js?v=1.12.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/dialog\/dialog.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/dialog\/dialog.position.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/dialog\/dialog.jquery-ui.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/misc\/dialog\/dialog.ajax.js?v=8.6.1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022https:\/\/cdn.jsdelivr.net\/npm\/jquery-validation@1.17.0\/dist\/jquery.validate.min.js\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/modules\/clientside_validation\/clientside_validation_jquery\/js\/cv.jquery.validate.js?spajq1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/modules\/clientside_validation\/clientside_validation_jquery\/js\/cv.jquery.ckeditor.js?spajq1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/modules\/clientside_validation\/clientside_validation_jquery\/js\/cv.jquery.ife.js?spajq1\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022\/CitizenPortalApplication-Dahod\/core\/assets\/vendor\/jquery-form\/jquery.form.min.js?v=4.22\u0022\u003E\u003C\/script\u003E\n\u003Cscript src=\u0022https:\/\/cdn.jsdelivr.net\/npm\/jquery-validation@1.17.0\/dist\/additional-methods.min.js\u0022\u003E\u003C\/script\u003E\n","settings":null},{"command":"openDialog","selector":"#drupal-modal","settings":null,"data":"\u003Cdiv id=\u0022modal_verification_form\u0022\u003E\u003Cform class=\u0022mobile-verification\u0022 data-drupal-selector=\u0022mobile-verification\u0022 action=\u0022\/CitizenPortalApplication-Dahod\/index.php\/en\/user\/mobile_verification\u0022 method=\u0022post\u0022 id=\u0022mobile-verification\u0022 accept-charset=\u0022UTF-8\u0022\u003E\n \u003Cbody\u003E\n\n \u003Cinput autocomplete=\u0022off\u0022 data-drupal-selector=\u0022form-v2vtgxhansjez7vqosbljzgzfrlnfunpjlgrq-8z1go\u0022 type=\u0022hidden\u0022 name=\u0022form_build_id\u0022 value=\u0022form-V2vTGXhaNSjeZ7vQOsBLJZgzfRlnFUNPjlgRq-8Z1go\u0022 \/\u003E\n\n \n \u003Cinput data-drupal-selector=\u0022edit-mobile-verification\u0022 type=\u0022hidden\u0022 name=\u0022form_id\u0022 value=\u0022mobile_verification\u0022 \/\u003E\n\n\t\u003Cdiv class=\u0022jumbotron\u0022\u003E\n\t \n\t\t \n\t\t\t\t\t\n\t\t\t\t\t \n\t \u003Cdiv class=\u0022container\u0022\u003E\n\t\t\u003Cdiv class=\u0022row\u0022\u003E\n\t\t\n\t\t\u003Cdiv class=\u0022col-md-8\u0022\u003E\n\t\t\t\t\t\u003Cdiv class=\u0022js-form-item form-item js-form-type-textfield form-item-name-mail js-form-item-name-mail\u0022\u003E\n \u003Clabel for=\u0022user-name\u0022 class=\u0022js-form-required form-required\u0022\u003EName or Email\u003C\/label\u003E\n \u003Cinput class=\u0022username form-text required\u0022 placeholder=\u0022Enter name\u0022 data-drupal-selector=\u0022user-name\u0022 data-msg-maxlength=\u0022Name or Email field has a maximum length of 60.\u0022 data-msg-required=\u0022Name or Email is required.\u0022 type=\u0022text\u0022 id=\u0022user-name\u0022 name=\u0022name_mail\u0022 value=\u0022\u0022 size=\u002260\u0022 maxlength=\u002260\u0022 required=\u0022required\u0022 aria-required=\u0022true\u0022 \/\u003E\n\n \u003C\/div\u003E\n\n\t\t\t\t\t\u003C\/div\u003E\n\t\t \u003C\/div\u003E\n\t\t\n\t\t\u003Cdiv class=\u0022row\u0022\u003E\n\t\t\n\t\t\u003Cdiv class=\u0022col-md-8\u0022\u003E\n\t\t\t\t\t\u003Cdiv class=\u0022js-form-item form-item js-form-type-number form-item-phoneno js-form-item-phoneno\u0022\u003E\n \u003Clabel for=\u0022phone-number\u0022 class=\u0022js-form-required form-required\u0022\u003EMobile number\u003C\/label\u003E\n \u003Cinput onkeydown=\u0022limitMobileNumber(this);\u0022 onkeyup=\u0022limitMobileNumber(this);\u0022 pattern=\u0022^[6-9]\\d{9}$\u0022 placeholder=\u0022Enter a valid 10 digit phone number\u0022 title=\u0022Enter 10 digit valid mobile number ( eg.9876543210 )\u0022 data-drupal-selector=\u0022phone-number\u0022 data-msg-step=\u0022The value in Mobile number has to be divisible by 1.\u0022 data-msg-required=\u0022Mobile number is required.\u0022 data-msg-pattern=\u0022Mobile number does not meet the requirements.\u0022 type=\u0022number\u0022 id=\u0022phone-number\u0022 name=\u0022phoneNo\u0022 value=\u0022\u0022 step=\u00221\u0022 class=\u0022form-number required\u0022 required=\u0022required\u0022 aria-required=\u0022true\u0022 \/\u003E\n\n \u003C\/div\u003E\n\n\t\t\t\t\t\u003C\/div\u003E\n\t\t \u003C\/div\u003E\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\u003Cdiv class=\u0022row\u0022\u003E\n\t\t\n\t\t\t\t\u003Cdiv class=\u0022col-md-8\u0022\u003E\n\t\t\t\t\t\u003Cinput title=\u0022Press to send the OTP\u0022 onclick=\u0022sendOTP()\u0022 data-drupal-selector=\u0022send-otp\u0022 type=\u0022submit\u0022 id=\u0022send-Otp\u0022 name=\u0022op\u0022 value=\u0022Send OTP\u0022 class=\u0022button js-form-submit form-submit\u0022 \/\u003E\n\u003Cdiv id=\u0022send-otp-message\u0022\u003E\u003C\/div\u003E\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\u003Cdiv class=\u0022row\u0022\u003E\n\t\t\n\t\t\t\t\u003Cdiv class=\u0022col-md-8\u0022\u003E\n\t\t\t\t\t\u003Cdiv class=\u0022js-form-item form-item js-form-type-number form-item-otp js-form-item-otp\u0022\u003E\n \u003Clabel for=\u0022Otp\u0022 class=\u0022js-form-required form-required\u0022\u003EEnter OTP\u003C\/label\u003E\n \u003Cinput maxlength=\u00226\u0022 onkeydown=\u0022limit(this);\u0022 onkeyup=\u0022limit(this);\u0022 onkeypress=\u0022verifyOTP()\u0022 type=\u0022number\u0022 placeholder=\u0022Enter 6 digit OTP sent to your phone\u0022 title=\u0022Enter the valid OTP\u0022 data-drupal-selector=\u0022otp\u0022 data-msg-step=\u0022The value in Enter OTP has to be divisible by 1.\u0022 data-msg-maxlength=\u0022Enter OTP field has a maximum length of 6.\u0022 data-msg-required=\u0022Enter OTP is required.\u0022 id=\u0022Otp\u0022 name=\u0022otp\u0022 value=\u0022\u0022 step=\u00221\u0022 class=\u0022form-number required\u0022 required=\u0022required\u0022 aria-required=\u0022true\u0022 \/\u003E\n\n \u003C\/div\u003E\n\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\n\t\t\t\t\t\u003Cdiv class=\u0022row\u0022\u003E\n\t\t\t\t\u003Cdiv class=\u0022col-md-8\u0022\u003E\n \u003Cinput title=\u0022Press to verify the OTP\u0022 data-drupal-selector=\u0022verify-otp\u0022 type=\u0022submit\u0022 id=\u0022verify-Otp\u0022 name=\u0022op\u0022 value=\u0022Submit\u0022 class=\u0022button js-form-submit form-submit\u0022 \/\u003E\n\u003Cdiv id=\u0022verify-otp-message\u0022\u003E\u003C\/div\u003E\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\u003Cdiv class=\u0022row\u0022\u003E\n\t\t\t\t\u003Cdiv class=\u0022col-md-6\u0022\u003E\n\t\t\t\t\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\u003C\/div\u003E\n\t\t\t\t\t\n\t\t\t\t\u003Cdiv class=\u0022js-form-item form-item js-form-type-textfield form-item-otp-status js-form-item-otp-status form-no-label\u0022\u003E\n \u003Cinput readonly=\u0022readonly\u0022 style=\u0022display: none\u0022 data-drupal-selector=\u0022otp-status\u0022 data-msg-maxlength=\u0022This field field has a maximum length of 128.\u0022 type=\u0022text\u0022 id=\u0022otp_status\u0022 name=\u0022otp_status\u0022 value=\u0022\u0022 size=\u002260\u0022 maxlength=\u0022128\u0022 class=\u0022form-text\u0022 \/\u003E\n\n \u003C\/div\u003E\n\n\t\t\t\t\u003Cdiv class=\u0022js-form-item form-item js-form-type-textfield form-item-get-name-mail js-form-item-get-name-mail form-no-label\u0022\u003E\n \u003Cinput readonly=\u0022readonly\u0022 style=\u0022display: none\u0022 data-drupal-selector=\u0022get-name-mail\u0022 data-msg-maxlength=\u0022This field field has a maximum length of 128.\u0022 type=\u0022text\u0022 id=\u0022get_name_mail\u0022 name=\u0022get_name_mail\u0022 value=\u0022\u0022 size=\u002260\u0022 maxlength=\u0022128\u0022 class=\u0022form-text\u0022 \/\u003E\n\n \u003C\/div\u003E\n\n\t\t\t\t\n\t\t\t\n\t\t\u003C\/div\u003E\n\t\t\n\t\u003C\/div\u003E\n\n\n\u003Cscript\u003E\n\tfunction limitMobileNumber(element){\n\t\tvar max_chars = 10;\n\n\t\tif(element.value.length \u003E max_chars) {\n\t\t\telement.value = element.value.substr(0, max_chars);\n\t\t}\n\t}\n\t\n\tfunction limit(element){\n\t\tvar max_chars = 6;\n\n\t\tif(element.value.length \u003E max_chars) {\n\t\t\telement.value = element.value.substr(0, max_chars);\n\t\t}\n\t}\n\tfunction getNameMail(){\n\t\tvar nameMailValue = document.getElementById(\u0022user-name\u0022).value;\n\t\tconsole.log(\u0027provided name or mail is:: \u0027+nameMailValue);\n\t\tdocument.getElementById(\u0022get_name_mail\u0022).defaultValue = nameMailValue;\n\t}\n\tfunction sendOTP() {\n\t\tconsole.log(\u0027:::invoking function:::\u0027);\n\t\t\/\/phone number validation starts\n\t\tvar phoneNumber = document.getElementById(\u0022phone-number\u0022).value;\n\t\tvar phoneRGEX = \/^[6-9]\\d{9}$\/;\n\t\tvar phoneResult = phoneRGEX.test(phoneNumber);\n\t\tif( phoneResult == false){;\n\t\t\n\t\t\tdocument.getElementById(\u0022send-otp-message\u0022).innerHTML=\u0027\u003Ci style=\u0022color: red;\u0022 class=\u0022fa fa-info-circle\u0022\u003E\u003C\/i\u003E Number is not valid\u0027\n\t\t\/\/phone number validation ends\n\t\t\n\t\t}else{\n\t\t\n\t\t\t\tvar userName = \u0022\u0022;\n\t\t\t\tvar phoneNumber = document.getElementById(\u0022phone-number\u0022).value;\n\t\t\t\tvar userMail = \u0022abc@example.com\u0022;\n\t\t\t\t\n\t\t\t\tconsole.log(\u0022get the account details to send otp \u0022+userName+\u0022 \u0022+phoneNumber+\u0022 \u0022+userMail);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tvar digits = \u00270123456789\u0027;\n\t\t\t\tvar otpLength = 6;\n\t\t\t\tvar otp = \u0027\u0027;\n\t\t\t\tfor(let i=1; i\u003C=otpLength; i++){\n\t\t\t\t\tvar index = Math.floor(Math.random()*(digits.length));\n\t\t\t\t\totp = otp + digits[index];\n\t\t\t\t}\n\t\t\t\n\t\t\t\tvar http = new XMLHttpRequest();\n\t\t\t\tvar url = \u0027https:\/\/portal.dahodsmartcity.in:6444\/CEPCityPortalOTPService\/portalController\/insertOtp\u0027;\n\t\t\t\t\n\t\t\t\tvar params = \n\t\t\t\tJSON.stringify({ name: userName ,phoneNo:phoneNumber,otp:otp, messageBody:otp+\u0027 is your webPortal code and is valid for 10 minutes.Do not share the otp with anyone.\u0027,status:\u0027failed\u0027,emailId:userMail});\n\t\t\t\t\n\t\t\t\thttp.open(\u0027POST\u0027, url, true);\n\n\t\t\t\t\/\/Send the proper header information along with the request\n\t\t\t\thttp.setRequestHeader(\u0027Content-type\u0027, \u0027application\/json\u0027);\n\n\t\t\t\thttp.onreadystatechange = function() {\/\/Call a function when the state changes.\n\t\t\t\t\tif(http.readyState == 4 \u0026\u0026 http.status == 200) {\n\t\t\t\t\t\tconsole.log(\u0027otp sending status\u0027+http.responseText);\n\t\t\t\t\t\tdocument.getElementById(\u0022send-otp-message\u0022).innerHTML=\u0027\u003Ci style=\u0022color: green;\u0022 class=\u0022fa fa-info-circle\u0022\u003E\u003C\/i\u003E OTP has sent successfully\u0027;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdocument.getElementById(\u0022send-otp-message\u0022).innerHTML=\u0027\u003Ci style=\u0022color: red;\u0022 class=\u0022fa fa-info-circle\u0022\u003E\u003C\/i\u003E Some error occured\u0027;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thttp.send(params);\n\t\t\t}\t\n\t\t\t\t\/\/end of code\n\t}\n\tfunction verifyOTP(){\n\t\t \n\t\tconsole.log(\u0027:::verify otp function invoked:::\u0027);\n\t\tvar enteredOTP = document.getElementById(\u0027Otp\u0027).value;\n\t\tvar phoneNumber = document.getElementById(\u0022phone-number\u0022).value;\n\t\tif(enteredOTP==null || enteredOTP == \u0027\u0027 || enteredOTP === \u0027undefined\u0027 || enteredOTP === \u00270\u0027){\n\t\t\tdocument.getElementById(\u0022verify-otp-message\u0022).innerHTML=\u0027\u003Ci style=\u0022color: red;\u0022 class=\u0022fa fa-info-circle\u0022\u003E\u003C\/i\u003E Please enter valid OTP\u0027;\n\t\t}else{\n\t\t\t\tvar http = new XMLHttpRequest();\n\t\t\t\thttp.onreadystatechange = function() {\/\/Call a function when the state changes.\n\t\t\t\t\t\tif(http.readyState == 4 \u0026\u0026 http.status == 200) {\n\t\t\t\t\t\t\tconsole.log(\u0027otp verify status\u0027+http.responseText);\n\t\t\t\t\t\t\tvar jsonResponse = JSON.parse(http.responseText);\n\t\t\t\t\t\t\totpStatus = jsonResponse[\u0022status\u0022];\n\t\t\t\t\t\t\tif(otpStatus == false){\n\t\t\t\t\t\t\t\tconsole.log(\u0027otp status is false\u0027);\n\t\t\t\t\t\t\t\tdocument.getElementById(\u0027otp_status\u0027).value = 0;\n\t\t\t\t\t\t\t\tconsole.log(\u0027otp status is 0\u0027);\n\t\t\t\t\t\t\t\tdocument.getElementById(\u0022verify-otp-message\u0022).innerHTML=\u0027\u003Ci style=\u0022color: red;\u0022 class=\u0022fa fa-info-circle\u0022\u003E\u003C\/i\u003E Please enter valid OTP\u0027;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdocument.getElementById(\u0027otp_status\u0027).value = 1;\n\t\t\t\t\t\t\t\tconsole.log(\u0027otp status is 1\u0027);\n\t\t\t\t\t\t\t\tdocument.getElementById(\u0022verify-otp-message\u0022).innerHTML=\u0027\u003Ci style=\u0022color: green;\u0022 class=\u0022fa fa-info-circle\u0022\u003E\u003C\/i\u003E Your entered OTP verified successfully\u0027;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tdocument.getElementById(\u0022verify-otp-message\u0022).innerHTML=\u0027\u003Ci style=\u0022color: red;\u0022 class=\u0022fa fa-info-circle\u0022\u003E\u003C\/i\u003E Please enter valid OTP\u0027;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar url = \u0027https:\/\/portal.dahodsmartcity.in:6444\/CEPCityPortalOTPService\/portalController\/validateOtp\u0027;\n\t\t\n\t\t\t\tvar params = JSON.stringify({ phoneNo:phoneNumber,otp:enteredOTP});\n\t\t\n\t\t\t\thttp.open(\u0027POST\u0027, url, true);\n\n\t\t\t\t\/\/Send the proper header information along with the request\n\t\t\t\thttp.setRequestHeader(\u0027Content-type\u0027, \u0027application\/json\u0027);\n http.send(params);\n\t\t\n\t\t}\n\t}\n\u003C\/script\u003E\n\u003C\/body\u003E\n\u003C\/form\u003E\n\u003C\/div\u003E","dialogOptions":{"width":"800","modal":true,"title":"Mobile Number Verification"}}]