-->

Tuesday, 20 October 2015

Get OTP Using JavaScript

Get OTP Using JavaScript

 <script>
            var otp_sent = 0;
            function get_otp() {
                return;
                if (otp_sent == 1) {
                    alert("OTP already sent........");
                    return;
                }
                var mobile_number_val = document.getElementById("mobile_number").value;
                var fid = "21";
                var did = "";
                var bid = "";
                otp_sent = 1;
                $.post("ajax_fucntion.aspx",
                {
                    function_id: fid,
                    contact_number: mobile_number_val
                },
                function(data, status) {
                    alert(data);
                }).fail(function(jqXHR, textStatus, errorThrown) {
                    alert("some error in submiting form plesase re-submit..");
                    _save.disabled = false;
                }); 

                //alert(mobile_number_val);
            }
        </script>                             

Read other related articles

Also read other articles

© Copyright 2019 Project Source Code | All Right Reserved