Dynamic Field Fill Up With Image

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
aviheaven
Posts: 9
Joined: Fri Dec 30, 2016 7:53 pm
Contact:

Dynamic Field Fill Up With Image

Post by aviheaven » Fri Feb 23, 2018 1:49 pm

Code: Select all

<!DOCTYPE html>
<html>
    <head>        
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Appointment Login</title>
         <link href='css/Online_regular.css' rel="stylesheet" type="text/css"/>
            <link href='css/jquery_theme_tvoa.css' rel="stylesheet" type="text/css"/>       
        <link rel="icon"  href="images/favicon.ico" />   
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/jquery-ui.js"></script>
       <script type="text/javascript" src="js/declarations.js?rev=25102017"></script>
<script type="text/javascript" src="js/blur_functions.js?rev=25102017"></script>
<script type="text/javascript" src="js/submit_functions.js?rev=25102017"></script>
<script type="text/javascript" src="js/pak_blur.js?rev=25102017"></script>
        

        <style>
            #form_info{
                display:none;
                position: fixed;
                margin:0 auto;
                top: 1%;
                left: 50%;	
                margin-left: -25%;	
                width: 50%;
                height: 50%;               
                filter:alpha(opacity=50);
                -moz-opacity:0.5;
                -khtml-opacity: 0.5;
                opacity: 1;
                z-index: 10000;
            }
            #overlay{
                width:100%;
                height:100%;position: fixed;
                z-index:0;
                top: 0;
                left:0;
                background:rgba(0,0,0,0.5);
            }
            ul.form_info_list {
                font-weight: bold;
            }
            ul.form_info_list li {
                font-weight: normal;
            }
            .know_req_info_span{
                color:#2080c9;
                font-size: 1.1em;
                cursor:pointer;
            }
            ul.errorMessage li{
                list-style-type: none;
                color:red;
            }
        </style> 

        <script>
            function refreshCaptcha()
            {
                try
                {
                    var d = new Date();
                    var n = d.getTime();
                    //document.getElementById("capt").src="images/1.jpg";
                    //alert("hi");
                    document.getElementById("capt").src = "captcha?rand=" + n;
                } catch (e)
                {
                    alert(e);
                }
                return false;
            }

            function image_loaded() {
                var width = $('#capt').css('width');
            }


            window.onload = function () {
                document.onkeydown = function (e) {
                    return (e.which || e.keyCode) != 116;
                }
            }
            $(document).ready(function () {

            
            });

        </script>
    </head>
    <body onLoad="backButtonOverride()">           
        <BR>

        <div class="wrapper">
            <div class="pageHeader" ></div> 
            <div class="pageHeading1 text_center">
                Appointment Login
                <a href="index.html"><img align="right" src="./images/home.png" style=" width: 30px; height:26px;" ></a>
            </div>
            <div class="container">
                <div class="form_container">   
                    <form  method="post" autocomplete="off" action="Get_Appointment" onsubmit="return validate_appointmentLogin_form();">  
                        <div class="row text_center" id="generate_otp_msg" style="font-weight:bold;font-size: 14px;padding-bottom: 10px;color:#BF0D0D">

                        </div>
                        <div class="row">
                            <div class="col-31"></div>
                            <div class="col-32">
                                <input name="otp_required" type="radio" value="generate_otp" id="generate_otp"  onClick="otpmgt()"> I want to Generate OTP
                                <BR>
                                <input name="otp_required" type="radio" value="have_otp" id="have_otp" onClick="otpmgt()">I have received OTP 

                                <BR><input name="otp_required" type="radio" value="send_alotment_sms" id="send_alotment_sms" onClick="otpmgt()"> Re-send Appointment Confirmation SMS.</div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory">Application Id</div>
                            <div class="col-32"><input name="filerfno" id="application_id" type="text" size='50' maxlength="12" title="Please Enter your Application Id" value=""/></div>
                            <div class="col-33">Please enter application id</div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory">Passport Number</div>
                            <div class="col-32"><input name="passport_no" id="passport_no" type="text" size='50' maxlength="14" title="Please Enter your Passport No. As in Passport" value="" /></div>
                            <div class="col-33">Please enter passport no</div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory"> <img src="DisplayDynamicField1"></div>
                            <div class="col-32"><input name="479125"  type="text"   class="textBoxDashed app_field"  size="20" maxlength="50"  onKeyUp="chkString(this)" onBlur='trim1(this);'/></div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory"> <img src="DisplayDynamicField2"></div>
                            <div class="col-32"><input name="929364"  type="text"   class="textBoxDashed app_field"  size="20" maxlength="50"  onKeyUp="chkString(this)" onBlur='trim1(this);'/></div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row cotp" style="display:none"> 
                            <div class="col-31 mandatory ">OTP</div>
                            <div class="col-32"><input name="otp" id="otp" type="text" size='50' maxlength="6" value=""></div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row">
                            <div class="col-1" id="label1">Access Code</div>
                            <div class="col-2"> <img src="captcha" id="capt" onload="image_loaded();" style="display: inline" style="width:100%;height:100%"/>
                            </div>
                            <div class="col-3"><a href="#"  onclick="return refreshCaptcha();" style="vertical-align: baseline"><img src="images/refresh.png" style="width:30px;height:30px;display: inline"/></a></div>
                        </div>

                        <div class="row">
                            <div class="col-1 mandatory" id="label2">Enter Access Code</div>
                            <div class="col-2"><input type="text" name="captcha" id="captcha" maxlength="20"/></div>
                            <div class="col-3 errorify" style="list-style-type: none"></div>
                        </div>
                        <div align="center" id="timer_msg" style="font-weight:bold;font-size: 14px;padding-top:20px">                           
                            <!--<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Submit" >                         -->

                        </div><br/><br/>
                        <div style="text-align: center;font-weight: bold;color:#C61919" id="error_msg">
                            
                        </div>
                        <input type="hidden" name="token" value='6f5020b8-69b8-4cb0-8be6-e24f67e89442'>
                        <input type="hidden"  value='70'/>
                    </form>
                </div>
                <BR/><BR/>
                <B>Instructions for Appointment</B>
                <ul class="instructions_ul text_bold">
                    <li>Applicants for tourist visa need an appointment date to submit their applications at IVACs</li>
                    <li> A one-time password (OTP) will be sent to mobile phone of the applicant which is required for securing the appointment date.</li>
                    <li>Applicants should fill in their details carefully and provide the correct mobile number.</li>
                    <li>The appointment will be sent as an SMS on the mobile phone of the applicant. This SMS should be shown by the applicant at the IVAC Center to enter and deposit the application</li>
                    <li>OTP can be generated only after the appointment time starts. </li>
                    <li>Appointment can be booked only after logging in using OTP. </li>
                    <li>OTP is valid for 20 minutes.</li>
                    <li>Maximum 3 OTPs can be generated on a given day for a File Number.</li>
                </ul>    
            </div>
        </div>     
    </body>
    <script>
        function generate_otp(filerfno_var, passport_no_var) {
            $('#error_msg').html('');
            var value1_var = document.getElementsByClassName("app_field")[0].value;
            var value2_var = document.getElementsByClassName("app_field")[1].value;

            if (document.getElementById('generate_otp').checked == true)
                var otp_required_var = "generate_otp";
            else if (document.getElementById('have_otp').checked == true)
                var otp_required_var = "have_otp";
            else if (document.getElementById('send_alotment_sms').checked == true)
                var otp_required_var = "send_alotment_sms";

            var otp_var = document.getElementById("otp").value;
            var captcha_var = document.getElementById("captcha").value;

            //http://localhost:8084/struts_bgd/json/GenerateOtp?filerfno=BGDDV0004116&passport_no=PASS123&value1=TEST&value2=TEST

            $.ajax({
                type: "POST",
                url: "json/GenerateOtp",
                dataType: "json",
                data: {filerfno: filerfno_var, passport_number: passport_no_var, value1: value1_var, value2: value2_var, otp_required: otp_required_var, otp: otp_var, captcha: captcha_var},
                success: function (data) {
                    //alert(data['sms_output']);                    
                    alert(data);
                    $('#generate_otp_msg').text(data);
                    refreshCaptcha();
                    $('#captcha').val('');
                    $('#have_otp').prop('checked', false);
                    $('#generate_otp').prop('checked', false);
                    $('#send_alotment_sms').prop('checked', false);

                }
            })
                    .done(function (data) {

                    })
                    .fail(function () {
                        alert("Some problem occurred");
                    })
                    .always(function () {
                    });
        }



        var refreshIntervalId;
        function startTimer(duration, display) {
            var timer = duration, minutes, seconds;
            refreshIntervalId = setInterval(function () {
                minutes = parseInt(timer / 60, 10)
                seconds = parseInt(timer % 60, 10);
                minutes = minutes < 10 ? minutes : minutes;
                seconds = seconds < 10 ? seconds : seconds;
                // display.text(minutes + ":" + seconds);
                display.text(seconds);
                $('#timer_msg').html('You can submit request after ' + seconds + ' seconds');
                if (--timer < 0) {
                    $('#timer_msg').html('<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Submit">');
                    return;
                }
            }, 1000);
        }

        function otpmgt() {
            var otp_check = null;
            $('#error_msg').html('');
            if (document.getElementById('have_otp').checked == true)
            {
                otp_check = document.getElementById('have_otp').value;
                $('.cotp').css('display', '');
                $('#otp').prop('disabled', false);
                //call timer function
                $('#timer_msg').html('');
                startTimer(45, $('#btn_time'));       
                document.getElementById("otp").disabled = false;
            }
            else if (document.getElementById('generate_otp').checked == true)
            {   //submit request through ajax
                clearInterval(refreshIntervalId);
                alert("OTP will be sent to your registered mobile number.");
                otp_check = document.getElementById('generate_otp').value;
                $('.cotp').css('display', 'none');
                $('#otp').val('');
                $('#otp').prop('disabled', true);
                $('.cappt_mobile').css('display', '');
                $('#btn1').val('Generate OTP');

                document.getElementById("otp").disabled = true;
                //display submit button now            
                $('#timer_msg').html('<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Generate OTP" >');

            } else if (document.getElementById('send_alotment_sms').checked == true)
            {
                clearInterval(refreshIntervalId);
                otp_check = document.getElementById('send_alotment_sms').value;
                $('.cotp').css('display', 'none');
                $('#otp').val('');
                $('#otp').prop('disabled', true);
                $('.cappt_mobile').css('display', 'none');
                document.getElementById("otp").disabled = true;
                $('#timer_msg').html('<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Send Allotment SMS" >');
            }

        }

        function validate_appointmentLogin_form() {
            var f1 = document.getElementsByClassName('app_field')[0].value;
            var f2 = document.getElementsByClassName('app_field')[1].value;

            var otp_value = document.getElementById("otp").value;
            var otp_length = otp_value.length;
            var otp_required_val = "";
            var otp_required_check = ($('input[type=radio]:checked').size() > 0);// false    
            var submit = true;
            var result = "";

            if (document.getElementById('application_id') != undefined) {
                result = validate_filenumber($('#application_id').val(), 1);
                if (result != "true")
                {
                    errorify($('#application_id'), result);
                    submit = false;
                }
                else
                {
                    correctify($('#application_id'), "Please enter application id");
                }
            }
            if (document.getElementById('passport_no') != undefined) {
                result = validate_passportNo($('#passport_no').val(), 1);
                if (result != "true")
                {
                    errorify($('#passport_no'), result);
                    submit = false;
                }
                else
                {
                    correctify($('#passport_no'), "");
                }
            }
            //if(f1 == null || f1.value == "" || isEmpty(f1)||f1.length==0)
            if (f1 == "" || f1.length == 0)
            {
                result = validate_passportNo(f1, 1);
                errorify($(document.getElementsByClassName('app_field')[0]), "Please enter all mandatory details");
                submit = false;
            } else
            {
                correctify($(document.getElementsByClassName('app_field')[0]), "");
            }
            if (f2 == "" || f2.length == 0)
            {
                //alert("Please Enter All mandtory fields"+document.getElementsByClassName('app_field')[1]);
                errorify($(document.getElementsByClassName('app_field')[1]), "Please enter all mandatory details");
                submit = false;
            }
            else 
            {
                correctify($(document.getElementsByClassName('app_field')[1]), "");
            }
            if (otp_required_check)
            {
                correctify($('#have_otp'), "");
                if (document.getElementById('have_otp').checked == true && otp_value.length == 0) {
                    errorify($('#otp'), "Please enter otp");
                    submit = false;
                    //  alert("Have OTP and Length= 0. Submit = " + submit);
                }
                else
                {
                    correctify($('#otp'), "");
                }
                if (document.getElementById('have_otp').checked == true && otp_value.length < 6) {
                    errorify($('#otp'), "Please enter correct otp");
                    submit = false;
                    // alert("Have OTP and Length< 6. Submit = " + submit);
                }
                else 
                {
                    correctify($('#otp'), "");
                }          
        
       
            }
            else
            {
                errorify($('#have_otp'), "Please select at least one option.");
                submit = false;
            }
            if (document.getElementById('captcha') != undefined) {
                result = validate_captcha($('#captcha').val(), 1);

                if (result != "true")
                {
                    errorify($('#captcha'), result);
                    submit = false;
                }
                else
                {
                    correctify_lowercase($('#captcha'), "");
                }
            }

            //if generate otp is clicked then submit function by ajax else submit to action    
            if (document.getElementById('generate_otp').checked == true && submit == true) {
                //call ajax function to generate otp    
                //disable submit button here


                generate_otp($('#application_id').val(), $('#passport_no').val());

                submit = false;
            }


            return submit;
        }

    </script>
</html>

I Can't Fill Up the the Father's name and Mother's name. How can i fill up the Dynamic Fields.

https://indianvisa-bangladesh.nic.in/visa/
Go To The Link And press "Get Appointment" And You will get the form.

I Want to do the task by Mozila Firefox Browser.
Last edited by chivracq on Tue Oct 11, 2022 8:39 am, edited 1 time in total.
Reason: Code Block added for Readability.
aviheaven
Posts: 9
Joined: Fri Dec 30, 2016 7:53 pm
Contact:

Re: Dynamic Field Fill Up With Image

Post by aviheaven » Fri Feb 23, 2018 6:30 pm

Hi,
Admin.
Is it possible or not ?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Dynamic Field Fill Up With Image

Post by chivracq » Fri Feb 23, 2018 11:30 pm

aviheaven wrote:

Code: Select all

<!DOCTYPE html>
<html>
    <head>        
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Appointment Login</title>
         <link href='css/Online_regular.css' rel="stylesheet" type="text/css"/>
            <link href='css/jquery_theme_tvoa.css' rel="stylesheet" type="text/css"/>       
        <link rel="icon"  href="images/favicon.ico" />   
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/jquery-ui.js"></script>
       <script type="text/javascript" src="js/declarations.js?rev=25102017"></script>
<script type="text/javascript" src="js/blur_functions.js?rev=25102017"></script>
<script type="text/javascript" src="js/submit_functions.js?rev=25102017"></script>
<script type="text/javascript" src="js/pak_blur.js?rev=25102017"></script>
        

        <style>
            #form_info{
                display:none;
                position: fixed;
                margin:0 auto;
                top: 1%;
                left: 50%;	
                margin-left: -25%;	
                width: 50%;
                height: 50%;               
                filter:alpha(opacity=50);
                -moz-opacity:0.5;
                -khtml-opacity: 0.5;
                opacity: 1;
                z-index: 10000;
            }
            #overlay{
                width:100%;
                height:100%;position: fixed;
                z-index:0;
                top: 0;
                left:0;
                background:rgba(0,0,0,0.5);
            }
            ul.form_info_list {
                font-weight: bold;
            }
            ul.form_info_list li {
                font-weight: normal;
            }
            .know_req_info_span{
                color:#2080c9;
                font-size: 1.1em;
                cursor:pointer;
            }
            ul.errorMessage li{
                list-style-type: none;
                color:red;
            }
        </style> 

        <script>
            function refreshCaptcha()
            {
                try
                {
                    var d = new Date();
                    var n = d.getTime();
                    //document.getElementById("capt").src="images/1.jpg";
                    //alert("hi");
                    document.getElementById("capt").src = "captcha?rand=" + n;
                } catch (e)
                {
                    alert(e);
                }
                return false;
            }

            function image_loaded() {
                var width = $('#capt').css('width');
            }


            window.onload = function () {
                document.onkeydown = function (e) {
                    return (e.which || e.keyCode) != 116;
                }
            }
            $(document).ready(function () {

            
            });

        </script>
    </head>
    <body onLoad="backButtonOverride()">           
        <BR>

        <div class="wrapper">
            <div class="pageHeader" ></div> 
            <div class="pageHeading1 text_center">
                Appointment Login
                <a href="index.html"><img align="right" src="./images/home.png" style=" width: 30px; height:26px;" ></a>
            </div>
            <div class="container">
                <div class="form_container">   
                    <form  method="post" autocomplete="off" action="Get_Appointment" onsubmit="return validate_appointmentLogin_form();">  
                        <div class="row text_center" id="generate_otp_msg" style="font-weight:bold;font-size: 14px;padding-bottom: 10px;color:#BF0D0D">

                        </div>
                        <div class="row">
                            <div class="col-31"></div>
                            <div class="col-32">
                                <input name="otp_required" type="radio" value="generate_otp" id="generate_otp"  onClick="otpmgt()"> I want to Generate OTP
                                <BR>
                                <input name="otp_required" type="radio" value="have_otp" id="have_otp" onClick="otpmgt()">I have received OTP 

                                <BR><input name="otp_required" type="radio" value="send_alotment_sms" id="send_alotment_sms" onClick="otpmgt()"> Re-send Appointment Confirmation SMS.</div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory">Application Id</div>
                            <div class="col-32"><input name="filerfno" id="application_id" type="text" size='50' maxlength="12" title="Please Enter your Application Id" value=""/></div>
                            <div class="col-33">Please enter application id</div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory">Passport Number</div>
                            <div class="col-32"><input name="passport_no" id="passport_no" type="text" size='50' maxlength="14" title="Please Enter your Passport No. As in Passport" value="" /></div>
                            <div class="col-33">Please enter passport no</div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory"> <img src="DisplayDynamicField1"></div>
                            <div class="col-32"><input name="479125"  type="text"   class="textBoxDashed app_field"  size="20" maxlength="50"  onKeyUp="chkString(this)" onBlur='trim1(this);'/></div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row"> 
                            <div  class="col-31 mandatory"> <img src="DisplayDynamicField2"></div>
                            <div class="col-32"><input name="929364"  type="text"   class="textBoxDashed app_field"  size="20" maxlength="50"  onKeyUp="chkString(this)" onBlur='trim1(this);'/></div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row cotp" style="display:none"> 
                            <div class="col-31 mandatory ">OTP</div>
                            <div class="col-32"><input name="otp" id="otp" type="text" size='50' maxlength="6" value=""></div>
                            <div class="col-33"></div> 
                        </div>
                        <div class="row">
                            <div class="col-1" id="label1">Access Code</div>
                            <div class="col-2"> <img src="captcha" id="capt" onload="image_loaded();" style="display: inline" style="width:100%;height:100%"/>
                            </div>
                            <div class="col-3"><a href="#"  onclick="return refreshCaptcha();" style="vertical-align: baseline"><img src="images/refresh.png" style="width:30px;height:30px;display: inline"/></a></div>
                        </div>

                        <div class="row">
                            <div class="col-1 mandatory" id="label2">Enter Access Code</div>
                            <div class="col-2"><input type="text" name="captcha" id="captcha" maxlength="20"/></div>
                            <div class="col-3 errorify" style="list-style-type: none"></div>
                        </div>
                        <div align="center" id="timer_msg" style="font-weight:bold;font-size: 14px;padding-top:20px">                           
                            <!--<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Submit" >                         -->

                        </div><br/><br/>
                        <div style="text-align: center;font-weight: bold;color:#C61919" id="error_msg">
                            
                        </div>
                        <input type="hidden" name="token" value='6f5020b8-69b8-4cb0-8be6-e24f67e89442'>
                        <input type="hidden"  value='70'/>
                    </form>
                </div>
                <BR/><BR/>
                <B>Instructions for Appointment</B>
                <ul class="instructions_ul text_bold">
                    <li>Applicants for tourist visa need an appointment date to submit their applications at IVACs</li>
                    <li> A one-time password (OTP) will be sent to mobile phone of the applicant which is required for securing the appointment date.</li>
                    <li>Applicants should fill in their details carefully and provide the correct mobile number.</li>
                    <li>The appointment will be sent as an SMS on the mobile phone of the applicant. This SMS should be shown by the applicant at the IVAC Center to enter and deposit the application</li>
                    <li>OTP can be generated only after the appointment time starts. </li>
                    <li>Appointment can be booked only after logging in using OTP. </li>
                    <li>OTP is valid for 20 minutes.</li>
                    <li>Maximum 3 OTPs can be generated on a given day for a File Number.</li>
                </ul>    
            </div>
        </div>     
    </body>
    <script>
        function generate_otp(filerfno_var, passport_no_var) {
            $('#error_msg').html('');
            var value1_var = document.getElementsByClassName("app_field")[0].value;
            var value2_var = document.getElementsByClassName("app_field")[1].value;

            if (document.getElementById('generate_otp').checked == true)
                var otp_required_var = "generate_otp";
            else if (document.getElementById('have_otp').checked == true)
                var otp_required_var = "have_otp";
            else if (document.getElementById('send_alotment_sms').checked == true)
                var otp_required_var = "send_alotment_sms";

            var otp_var = document.getElementById("otp").value;
            var captcha_var = document.getElementById("captcha").value;

            //http://localhost:8084/struts_bgd/json/GenerateOtp?filerfno=BGDDV0004116&passport_no=PASS123&value1=TEST&value2=TEST

            $.ajax({
                type: "POST",
                url: "json/GenerateOtp",
                dataType: "json",
                data: {filerfno: filerfno_var, passport_number: passport_no_var, value1: value1_var, value2: value2_var, otp_required: otp_required_var, otp: otp_var, captcha: captcha_var},
                success: function (data) {
                    //alert(data['sms_output']);                    
                    alert(data);
                    $('#generate_otp_msg').text(data);
                    refreshCaptcha();
                    $('#captcha').val('');
                    $('#have_otp').prop('checked', false);
                    $('#generate_otp').prop('checked', false);
                    $('#send_alotment_sms').prop('checked', false);

                }
            })
                    .done(function (data) {

                    })
                    .fail(function () {
                        alert("Some problem occurred");
                    })
                    .always(function () {
                    });
        }



        var refreshIntervalId;
        function startTimer(duration, display) {
            var timer = duration, minutes, seconds;
            refreshIntervalId = setInterval(function () {
                minutes = parseInt(timer / 60, 10)
                seconds = parseInt(timer % 60, 10);
                minutes = minutes < 10 ? minutes : minutes;
                seconds = seconds < 10 ? seconds : seconds;
                // display.text(minutes + ":" + seconds);
                display.text(seconds);
                $('#timer_msg').html('You can submit request after ' + seconds + ' seconds');
                if (--timer < 0) {
                    $('#timer_msg').html('<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Submit">');
                    return;
                }
            }, 1000);
        }

        function otpmgt() {
            var otp_check = null;
            $('#error_msg').html('');
            if (document.getElementById('have_otp').checked == true)
            {
                otp_check = document.getElementById('have_otp').value;
                $('.cotp').css('display', '');
                $('#otp').prop('disabled', false);
                //call timer function
                $('#timer_msg').html('');
                startTimer(45, $('#btn_time'));       
                document.getElementById("otp").disabled = false;
            }
            else if (document.getElementById('generate_otp').checked == true)
            {   //submit request through ajax
                clearInterval(refreshIntervalId);
                alert("OTP will be sent to your registered mobile number.");
                otp_check = document.getElementById('generate_otp').value;
                $('.cotp').css('display', 'none');
                $('#otp').val('');
                $('#otp').prop('disabled', true);
                $('.cappt_mobile').css('display', '');
                $('#btn1').val('Generate OTP');

                document.getElementById("otp").disabled = true;
                //display submit button now            
                $('#timer_msg').html('<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Generate OTP" >');

            } else if (document.getElementById('send_alotment_sms').checked == true)
            {
                clearInterval(refreshIntervalId);
                otp_check = document.getElementById('send_alotment_sms').value;
                $('.cotp').css('display', 'none');
                $('#otp').val('');
                $('#otp').prop('disabled', true);
                $('.cappt_mobile').css('display', 'none');
                document.getElementById("otp").disabled = true;
                $('#timer_msg').html('<input name="submit_btn" id="btn1" type="submit" class="btn btn-primary"  value="Send Allotment SMS" >');
            }

        }

        function validate_appointmentLogin_form() {
            var f1 = document.getElementsByClassName('app_field')[0].value;
            var f2 = document.getElementsByClassName('app_field')[1].value;

            var otp_value = document.getElementById("otp").value;
            var otp_length = otp_value.length;
            var otp_required_val = "";
            var otp_required_check = ($('input[type=radio]:checked').size() > 0);// false    
            var submit = true;
            var result = "";

            if (document.getElementById('application_id') != undefined) {
                result = validate_filenumber($('#application_id').val(), 1);
                if (result != "true")
                {
                    errorify($('#application_id'), result);
                    submit = false;
                }
                else
                {
                    correctify($('#application_id'), "Please enter application id");
                }
            }
            if (document.getElementById('passport_no') != undefined) {
                result = validate_passportNo($('#passport_no').val(), 1);
                if (result != "true")
                {
                    errorify($('#passport_no'), result);
                    submit = false;
                }
                else
                {
                    correctify($('#passport_no'), "");
                }
            }
            //if(f1 == null || f1.value == "" || isEmpty(f1)||f1.length==0)
            if (f1 == "" || f1.length == 0)
            {
                result = validate_passportNo(f1, 1);
                errorify($(document.getElementsByClassName('app_field')[0]), "Please enter all mandatory details");
                submit = false;
            } else
            {
                correctify($(document.getElementsByClassName('app_field')[0]), "");
            }
            if (f2 == "" || f2.length == 0)
            {
                //alert("Please Enter All mandtory fields"+document.getElementsByClassName('app_field')[1]);
                errorify($(document.getElementsByClassName('app_field')[1]), "Please enter all mandatory details");
                submit = false;
            }
            else 
            {
                correctify($(document.getElementsByClassName('app_field')[1]), "");
            }
            if (otp_required_check)
            {
                correctify($('#have_otp'), "");
                if (document.getElementById('have_otp').checked == true && otp_value.length == 0) {
                    errorify($('#otp'), "Please enter otp");
                    submit = false;
                    //  alert("Have OTP and Length= 0. Submit = " + submit);
                }
                else
                {
                    correctify($('#otp'), "");
                }
                if (document.getElementById('have_otp').checked == true && otp_value.length < 6) {
                    errorify($('#otp'), "Please enter correct otp");
                    submit = false;
                    // alert("Have OTP and Length< 6. Submit = " + submit);
                }
                else 
                {
                    correctify($('#otp'), "");
                }          
        
       
            }
            else
            {
                errorify($('#have_otp'), "Please select at least one option.");
                submit = false;
            }
            if (document.getElementById('captcha') != undefined) {
                result = validate_captcha($('#captcha').val(), 1);

                if (result != "true")
                {
                    errorify($('#captcha'), result);
                    submit = false;
                }
                else
                {
                    correctify_lowercase($('#captcha'), "");
                }
            }

            //if generate otp is clicked then submit function by ajax else submit to action    
            if (document.getElementById('generate_otp').checked == true && submit == true) {
                //call ajax function to generate otp    
                //disable submit button here


                generate_otp($('#application_id').val(), $('#passport_no').val());

                submit = false;
            }


            return submit;
        }

    </script>
</html>
I Can't Fill Up the the Father's name and Mother's name. How can i fill up the Dynamic Fields.

https://indianvisa-bangladesh.nic.in/visa/
Go To The Link And press "Get Appointment" And You will get the form.

I Want to do the task by Mozila Firefox Browser.
Hum..., "Creativity" is indeed about trespassing the Concepts of "Cluster" + "Functionality" and that's a Process I always encourage with Software, but hum..., I'm not sure it works very well on a (Tech) Forum...! :?
Although sleeping (once) in the Kitchen or having a BBQ in the Bedroom can be Fun, I guess...!? 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
aviheaven
Posts: 9
Joined: Fri Dec 30, 2016 7:53 pm
Contact:

Re: Dynamic Field Fill Up With Image

Post by aviheaven » Sat Feb 24, 2018 10:14 am

I can't understand. Is it possible or not ?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Dynamic Field Fill Up With Image

Post by chivracq » Sat Feb 24, 2018 1:01 pm

aviheaven wrote:I can't understand. Is it possible or not ?
I guess so..., if you put a mattress, then yep, why not, you can sleep in the Kitchen... 8)

And if you still don't understand, maybe this Post will help... :idea:
+ Using the ]CODE[ Forum Meta-Tags for you...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
aviheaven
Posts: 9
Joined: Fri Dec 30, 2016 7:53 pm
Contact:

Re: Dynamic Field Fill Up With Image

Post by aviheaven » Mon Mar 12, 2018 11:47 am

But how Can Detect The Value?
Post Reply