ClientScript.RegisterClientScriptBlock alerts gives Microsoft JScript runtime error

Last Reply on Dec 29, 2015 08:28 AM By Shashikant

Posted on Dec 29, 2015 05:51 AM

 

After ClientScript.RegisterClientScriptBlock  execution it gets  exception as 'Microsoft JScript runtime error: Unable to get value of the property 'options': object is null or undefined'.

 string mortgagorAddress = ds.Tables[0].Rows[0]["BMO_txtMortgagorAddress"].ToString();
            string BMONumber = ds.Tables[0].Rows[0]["BMO_txtBMONumber"].ToString();
            int duplicate = userBL.GetDuplicateInsertion(BMONumber,mortgagorAddress);
            if (duplicate >0)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "Duplicate", "alert('Duplicate Data Exists.');", true);
               return;
      

            }

Above given is my code.

You are viewing reply posted by: Shashikant on Dec 29, 2015 08:28 AM.
Posted on Dec 29, 2015 08:28 AM

Hi,

I have checked you code It is working fine.I would suggest you to try the same code on new HTML page.

HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Bank Of Montreal(BMO)</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"
        type="text/javascript"></script>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
        rel="Stylesheet" type="text/css" />
    <style type="text/css">
        #ui-datepicker-div td
        {
            font-size: 10px;
        }
    </style>
    <script type="text/javascript">
        function CloseWindow() {
            window.open('', '_parent', '');
            window.close();
        }

        $(document).ready(function () {

            //to block date below 6 month for all user
            var minDt = -180;
            //to block  previous date if user has no right to give effective date 6 months back
            if (document.getElementById("hdnUserRight").value == "False") {
                minDt = 0;
                /// maxDate: +30,
            };

            $("#BMO_txtEffectiveDate").datepicker({
                changeMonth: true,
                changeYear: true,
                minDate: minDt,
                //maxDate: +30,


                onClose: function (dateText, instance) {
                    var date,
                        _dateFormat = instance.settings.dateFormat || $.datepicker._defaults.dateFormat,
                        _settings = instance.settings;
                    try {
                        date = $.datepicker.parseDate(_dateFormat, dateText, _settings);
                    }
                    catch (e) {
                        alert("Please enter valid date.");
                    }
                    if (date) {

                        $(this).val($.datepicker.formatDate(_dateFormat, date, _settings));
                    }
                    else {
                        $(this).val("");
                    }

                    //New codes added for validation if user enter date manually without calender control
                    var d = new Date();
                    d.setMonth(d.getMonth() - 6);
                    var New_Date = new Date($("#BMO_txtEffectiveDate").val());
                    if (New_Date < d) {
                        alert("Date should not be less than 6 months from today.");
                        $('#BMO_txtEffectiveDate').val('');
                        return false;
                    }
                    var Today = new Date();
                    //to remove time from  datepart
                    Today.setHours(0, 0, 0, 0);
                    var New_Date = new Date($("#BMO_txtEffectiveDate").val());
                    //to remove time from  datepart
                    New_Date.setHours(0, 0, 0, 0)

                    if (document.getElementById("hdnUserRight").value == "False") {
                        if (New_Date < Today) {
                            alert("Date should not be less than CurrentDate.");
                            $('#BMO_txtEffectiveDate').val('');
                            return false;
                        }
                    }
                    checkQueterDate();

                }
            });



            $(".ui-datepicker").css("font-size", "10px");
        });
        //to block Effective date from previous policy period if he is second quater
        function checkQueterDate() {
            var EffectiveDate = new Date($("#BMO_txtEffectiveDate").val());
            var Today = new Date();

            //to get effective date feb 01
            var PolicyStartDate = new Date(Today.getFullYear(), 1, 1);
            //to get May 1-start odf ssecond quater
            var firstquarterEndDate = new Date(Today.getFullYear(), 4, 0);
            if (firstquarterEndDate > Today && EffectiveDate < PolicyStartDate) {
                alert("Date should not be less than current policy period.");
                $('#BMO_txtEffectiveDate').val('');
                return false;
            }

        }

        var arrFields = new Array();
        arrFields[0] = 'BMO_txtOutPrincipalBalance';
        arrFields[1] = 'BMO_txtContentsValue';
        arrFields[2] = 'BMO_txtBMONumber';


        function ajaxObject(url, callbackFunction) {
            var that = this;
            this.updating = false;
            this.abort = function () {
                if (that.updating) {
                    that.updating = false;
                    that.AJAX.abort();
                    that.AJAX = null;
                }
            }
            this.update = function (passData, postMethod) {
                if (that.updating) { return false; }
                that.AJAX = null;
                if (window.XMLHttpRequest) {
                    that.AJAX = new XMLHttpRequest();
                } else {
                    that.AJAX = new ActiveXObject("Microsoft.XMLHTTP");
                }
                if (that.AJAX == null) {
                    return false;
                } else {
                    that.AJAX.onreadystatechange = function () {
                        if (that.AJAX.readyState == 4) {
                            that.updating = false;
                            that.callback(that.AJAX.responseText, that.AJAX.status, that.AJAX.responseXML);
                            that.AJAX = null;
                        }
                    }
                    that.updating = new Date();
                    if (/post/i.test(postMethod)) {
                        var uri = urlCall;
                        that.AJAX.open("POST", uri, true);
                        that.AJAX.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                        that.AJAX.setRequestHeader("Content-Length", passData.length);
                        that.AJAX.send(passData);
                    } else {
                        var uri = urlCall;
                        that.AJAX.open("GET", uri, true);
                        that.AJAX.send(null);
                    }
                    return true;
                }
            }
            var urlCall = url;
            this.callback = callbackFunction || function () { };
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        function CallserverIndex(dealerName) {
            var dealer_Name = Trim(document.getElementById(dealerName).value);
            if (dealer_Name == "Sel") {
                document.getElementById('BMO_txtOwnerAddress').value = "";
                var e = document.getElementById('BMO_ddlOwnerState');
                e.options[0].selected = true;
                document.getElementById('BMO_txtOwnerZip').value = "";
                document.getElementById('BMO_txtOwnerCity').value = "";

            }
            if (dealer_Name != "Sel") {
                var url = "ApplyNow.aspx?ContentId=" +
                        document.getElementById('hdnContentId').value +
                        "&dt=" + new Date().getSeconds() + "&dealername=" + dealer_Name;
                var myrequest1 = new ajaxObject(url, processData);
                myrequest1.callback = function (a, b, responseXML) {
                    message = responseXML;
                    var ApplicationList = responseXML.getElementsByTagName("ApplicationList");
                    var count_ApplicationList = ApplicationList.length;
                    if (ApplicationList[0].getElementsByTagName("Address")[0].firstChild.data != null) {
                        document.getElementById('BMO_txtOwnerAddress').value = ApplicationList[0].getElementsByTagName("Address")[0].firstChild.data;
                    }
                    if (ApplicationList[0].getElementsByTagName("State")[0].firstChild.data != null) {
                        var e = document.getElementById('BMO_ddlOwnerState');
                        var statevalue = ApplicationList[0].getElementsByTagName("State")[0].firstChild.data;
                        for (optionCounter = 0; optionCounter < e.length; optionCounter++) {
                            if (e.options[optionCounter].value == statevalue) {
                                e.options[optionCounter].selected = true;
                            }
                        }
                    }
                    if (ApplicationList[0].getElementsByTagName("Zip")[0].firstChild.data != null) {
                        document.getElementById('BMO_txtOwnerZip').value = ApplicationList[0].getElementsByTagName("Zip")[0].firstChild.data;
                    }
                    if (ApplicationList[0].getElementsByTagName("City")[0].firstChild.data != null) {
                        document.getElementById('BMO_txtOwnerCity').value = ApplicationList[0].getElementsByTagName("City")[0].firstChild.data;
                    }

                }
                myrequest1.update();
            }
        }

        function AddItem(Text, Value) {
            var opt = document.createElement("option");
            document.getElementById("BMO_ddlReportingYear").options.add(opt);
            opt.text = Text;
            opt.value = Value;
        }

        function processData(responseText, responseStatus) {
            if (responseStatus == 200) {
                alert(responseText);
            } else {
                alert(responseStatus + ' -- Error Processing Request');
            }
        }

        function CallServerIndex_populateDealershipName() {

            var e = document.getElementById('BMO_ddlDealershipName');
            var url = "ApplyNow.aspx?ContentId=" + document.getElementById('hdnContentId').value + "&dt=" + new Date().getSeconds() + "&Dealers=" + 1;
            if (window.XMLHttpRequest) {
                req = new XMLHttpRequest();
            }
            else if (window.ActiveXObject) {
                try {
                    req = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e) {
                    try {
                        req = new ActiveXObject("Microsoft.XMLHTTP");
                    }
                    catch (e2) {
                        req = false;
                    }
                }
            }
            req.open("GET", url, true);
            req.onreadystatechange = callback;
            req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            req.send(null);
        }

        //Ajax request, response handler
        function callback() {
            if (req.readyState == 4) {
                if (req.status == 200) {
                    //parseMessage();
                    return true;
                }
            }
            return false;
        }


        function addOption(selectbox, text, value) {
            var optn = document.createElement("OPTION");
            text = text.replace(/&amp;/g, '&');
            value = value.replace(/&amp;/g, '&');
            optn.text = text;
            optn.value = value;
            selectbox.options.add(optn);
        }

        function fillstates() {
            var stateArray = document.getElementById('hdnSateNames').value.split("#");
            for (var count = 0; count <= stateArray.length - 2; count++) {
                var state = stateArray[count];
                var stateCode = (state.split(";")[0]);
                var StateName = (state.split(";")[1]);
                addOption(document.getElementById('BMO_ddlMortgagorState'), StateName, stateCode);
            }
        }

        function fillAffiliates() {
            var AffiliateArray = document.getElementById('hdnAffiliates').value.split("#");
            for (var count = 0; count <= AffiliateArray.length - 2; count++) {
                var Affiliate = AffiliateArray[count];
                var AffiliateCode = (Affiliate.split("^")[0]);
                var AffiliateText = (Affiliate.split("^")[1]);

                addOption(document.getElementById('BMO_ddlAffiliate'), AffiliateText, AffiliateCode);
            }
        }

        function fillGroups() {
            var GroupArray = document.getElementById('hdnGroup').value.split("#");
            for (var count = 0; count <= GroupArray.length - 2; count++) {
                var Group = GroupArray[count];
                var GroupValue = (Group.split("^")[0]);
                var GroupText = (Group.split("^")[1]);
                addOption(document.getElementById('BMO_ddlBMOGroup'), GroupText, GroupValue);
            }
        }
        function Details() {
            fillstates();
            fillAffiliates();
            fillGroups();

            document.getElementById('BMO_txtMortgagorFName').value = document.getElementById('hdnDealershipName').value;
            document.getElementById('BMO_txtMortgagorAddress').value = document.getElementById('hdnAddress').value;

            document.getElementById('BMO_txtMortgagorCity').value = document.getElementById('hdnCity').value;
            if (document.getElementById('hdnState').value == '') {
                document.getElementById('BMO_ddlMortgagorState').selectedIndex = 0;
            }
            else {
                document.getElementById('BMO_ddlMortgagorState').value = document.getElementById('hdnState').value;
            }
            document.getElementById('BMO_txtMortgagorZip').value = document.getElementById('hdnZip').value;
            document.getElementById('BMO_txtBuildingValue').value = document.getElementById('hdnNewVehicleValue').value;
            document.getElementById('BMO_txtContentsValue').value = document.getElementById('hdnUsedVehicleValue').value;
            document.getElementById('BMO_txtBMONumber').value = document.getElementById('hdnRoadVehicleValue').value;
        }
         
    </script>
</head>
<body style="background: #6B9AAD url(_gfx/bgrd_tile.jpg) repeat-x fixed 0 0;" onload="CallServerIndex_populateDealershipName();Details();">
    <form name="Form1" method="post" action="ApplyNow.aspx?Userid=MQ%3d%3d" id="Form1">
    <div>
        <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
        <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
        <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTM5MDQyNjA5ZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUJYnRuU3VibWl0Euf2EExuk1tVHx9vna6ZDMMH8yM=" />
    </div>
    <script type="text/javascript">
//<![CDATA[
        var theForm = document.forms['Form1'];
        if (!theForm) {
            theForm = document.Form1;
        }
        function __doPostBack(eventTarget, eventArgument) {
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.__EVENTTARGET.value = eventTarget;
                theForm.__EVENTARGUMENT.value = eventArgument;
                theForm.submit();
            }
        }
//]]>
    </script>
    <script>        CurrDate = '12/29/2015';</script>
    <script>        function ValidateSection() { switch (i) { default: return true; break; } } DivCount = 0;</script>
    <div>
        <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="6B424F7D" />
        <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWGgKNrNXVDgLCi9reAwKR1d+MAQLn2fC5DQL8oeOpAQL4s82PAgK17crhAQLzoL7iAgLlofLMBwLph5jtCALHqOWTBgLY7YrWCAKmmKvvCwLegcySDwLK8pSpDwLI5K+CAwKZlr35BwKsn5uIBQKY0eDtAQLWu+xnApjkmpAGAp24utIOAomaw/8FArHAifIEAqO3vZICAunNqfII6GZurpIIC9ZPA6J2ju7llHuJ3i0=" />
    </div>
    <table style="width: 805px; height: 100%; background-color: #ffffff" align="center"
        cellpadding="0" cellspacing="0" border="0">
        <tr id="trContent">
            <td>
                <table style="width: 100%" border="0">
                    <tr>
                        <td colspan="2">
                            <img src="_gfx/previous_disabled.gif" id="imgPreviousTop" onclick="ShowDiv('P')"
                                alt="Previous" style="display: none" />
                        </td>
                        <td style="text-align: right">
                            <img src="_gfx/next.gif" id="imgNextTop" onclick="ShowDiv('N')" name="imgNextTop"
                                alt="Next" style="display: none" />
                        </td>
                    </tr>
                    <tr style="border: 1px">
                        <td align="center" colspan="3">
                            <center>
                                <span id="spnHeader">
                                    <table style="background-color: #527683; width: 100%" border="2" rules="none" cellspacing="1"
                                        bordercolor="#013879" cellpadding="3">
                                        <tbody>
                                            <tr>
                                                <td style="height: 40%">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="text-align: center">
                                                    <span style="color: #ffffff; font-size: 20px; font-weight: bold">Bank of Montreal</span>
                                                    <br />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 40%">
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </span>
                            </center>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="3">
                            <span id="spnContent">
                                <script></script>
                                <div id='div0'>
                                    <table style="border-bottom: #000066 0px solid; border-left: #000066 0px solid; width: 100%;
                                        border-top: #000066 0px solid; border-right: #000066 0px solid" cellspacing="2"
                                        bordercolor="#013879" cellpadding="1" align="left">
                                        <tbody>
                                            <tr>
                                                <td style="text-align: left; width: 40%; vertical-align: middle" bgcolor="#638294"
                                                    colspan="2">
                                                    <font color="#ffffff">Owner/Mortgagor’s Information :</font>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 50%">
                                                    Owner/Mortgagor’s First Name
                                                </td>
                                                <td style="width: 50%">
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtMortgagorFName" onclick="" onchange="" maxlength="100" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Owner/Mortgagor’s Last Name
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtMortgagorLName" onclick="" onchange="" maxlength="100" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Owner/Mortgagor’s Address :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtMortgagorAddress" onclick="" onchange="" maxlength="100" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Owner/Mortgagor’s City :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtMortgagorCity" onclick="" onchange="" maxlength="100" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Owner/Mortgagor’s State :
                                                </td>
                                                <td>
                                                    <span><span>
                                                        <select style="width: 51%" id="BMO_ddlMortgagorState" onclick="" onchange="">
                                                            <option selected="" value="NA">Select</option>
                                                        </select>
                                                    </span></span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Owner/Mortgagor’s Zip :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input onblur="ZipOnBlur(this);" style="width: 50%" id="BMO_txtMortgagorZip" onkeypress="return ZipKeyPress(this.value,event)"
                                                            onclick="" onchange="" maxlength="10" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Cost Center :
                                                </td>
                                                <td>
                                                    <span>
                                                        <!-- old <input style="width: 17.6%" id="BMO_txtCostCenter"
                                                onkeypress="return NumberKeyPress(event)" onblur="return NumberOnBlur(this)"
                                                 onclick="" onchange="">-->
                                                        <input onblur="" style="width: 50%" id="BMO_txtCostCenter" onfocus="" onkeypress="return FKeyPress (this.value,event)"
                                                            onclick="" onchange="" maxlength="20" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Bank Region :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtBankRegion" onkeypress="return FKeyPress (this.value,event)"
                                                            onclick="" onchange="" maxlength="100" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Property Type<b style="color: red">*</b> :
                                                </td>
                                                <td>
                                                    Commercial <span>
                                                        <input id="BMO_rdoPropTypeCommercial" onclick="" onchange="" value="1" checked=""
                                                            type="radio" name="PropertyType" /></span> Residential <span>
                                                                <input id="BMO_rdoPropTypeResidential" onclick="" onchange="" value="2" type="radio"
                                                                    name="PropertyType" /></span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Description of Property :
                                                </td>
                                                <td>
                                                    <span>
                                                        <textarea style="width: 95%" id="BMO_txtDescOfProperty" onclick="null" onchange="null"
                                                            maxlength="500">
                                                </textarea>
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="text-align: left; width: 40%; vertical-align: middle" bgcolor="#638294"
                                                    colspan="2">
                                                    <font color="#ffffff">Relationship Manager/Employee Requesting Information :</font>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Relationship Manager/Employee Requesting Loan First Name:
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtRelManagerFName" onclick="" onchange="" maxlength="100" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Relationship Manager /Employee Requesting Loan Last Name:
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtRelManagerLName" onclick="" onchange="" maxlength="100" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Relationship Manager Phone Number<!--<b style="color: red">*</b>-->
                                                    :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input onblur="return PhoneOnBlur(this)" style="width: 50%" id="BMO_txtRelManagerPhone"
                                                            onkeypress="return PhoneKeyPress(this.value,event)" onclick="" onchange="" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Relationship Manager Email Address<!--<b style="color: red">*</b>-->
                                                    :
                                                </td>
                                                <td>
                                                    <!--title="* Email Address"-->
                                                    <span>
                                                        <input onblur="return checkemail(this.id)" style="width: 50%" id="BMO_txtRelManagerEmail"
                                                            onclick="" onchange="" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    BMO Group<b style="color: red">*</b> :
                                                </td>
                                                <td>
                                                    <span><span>
                                                        <select style="width: 51%" id="BMO_ddlBMOGroup" onclick="" onchange="" runat="server"
                                                            title="* Please select 'BMO Group'.">
                                                            <option selected="" value="0">Select</option>
                                                        </select>
                                                    </span></span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    BMO Affiliate<b style="color: red">*</b> :
                                                </td>
                                                <td>
                                                    <span><span>
                                                        <select style="width: 51%" id="BMO_ddlAffiliate" onclick="" onchange="" runat="server"
                                                            title="* Please select 'BMO Affiliate'.">
                                                            <option selected="" value="0">Select</option>
                                                        </select>
                                                    </span></span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="text-align: left; width: 40%; vertical-align: middle" bgcolor="#638294"
                                                    colspan="2">
                                                    <font color="#ffffff">Loan Information :</font>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Outstanding Principal Balance/Building Value<b style="color: red">*</b> :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input onblur="setNum(this.id);" style="width: 50%" id="BMO_txtBuildingValue" onfocus="setNormalNum(this)"
                                                            title="* 'Outstanding Principal Balance/Building Value'." onkeypress="return FKeyPress (this.value,event)"
                                                            onclick="" maxlength="12" />
                                                        <!--  CalculateSum(arrFields,'AMSI_txtTotalMonthlyInven');"-->
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Contents Value :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input onblur="setNum(this.id);" style="width: 50%" id="BMO_txtContentsValue" onfocus="setNormalNum(this)"
                                                            onkeypress="return FKeyPress (this.value,event)" onclick="" value="0" maxlength="12" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    BMO Number :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtBMONumber" onkeypress="return FKeyPress (this.value,event)"
                                                            onclick="" maxlength="12" />
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Forceplace/REO<b style="color: red">*</b> :
                                                </td>
                                                <td>
                                                    <span><span>
                                                        <select style="width: 51%" id="BMO_ddlForceplaceREO" title="* Please select 'Forceplace/REO'."
                                                            onclick="" onchange="" runat="server">
                                                            <option selected="" value="sel">Select</option>
                                                            <option value="1">Forceplace</option>
                                                            <option value="2">REO</option>
                                                        </select>
                                                    </span></span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Effective Date<b style="color: red">*</b> :
                                                </td>
                                                <td>
                                                    <span>
                                                        <input style="width: 50%" id="BMO_txtEffectiveDate" title="*  'Effective Date'."
                                                            onclick="" onchange="" />
                                                        <!--<asp:TextBox ID="txtCheckDate" runat="server" CssClass="inpTxtE"></asp:TextBox> <font color="#ff0066">*</font>-->
                                                        <!--<img id="img3" onmouseover="this.style.cursor='hand'" title="Select Date" onclick="javascript:showCalendarControl(document.getElementById('BMO_txtEffectiveDate')); return false;"
                                                src="_gfx/icon_cal.gif" align="middle" name="imgEFFDate" >
                    -->
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                            </tr>
                                            <tr>
                                                <td style="text-align: left; vertical-align: middle" colspan="2">
                                                    <br />
                                                    <p>
                                                        <span>
                                                            <input onblur="" id="BMO_chkAgree" title="* Please select if the information provided is correct and accurate."
                                                                onclick="" value="True" type="checkbox" />
                                                        </span>By Checking this box, typing your name and your title you are affirming the
                                                        above information is correct and accurate.</p>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <table width="100%">
                                                        <tbody>
                                                            <tr>
                                                                <td style="width: 15%">
                                                                    Name/Signature<b style="color: red">*</b> :
                                                                </td>
                                                                <td style="width: 35%">
                                                                    <span>
                                                                        <input style="width: 50%" id="BMO_txtSignature" title="* 'Name/Signature'." onclick=""
                                                                            onchange="" />
                                                                    </span>
                                                                </td>
                                                                <td style="width: 7%">
                                                                    Title<b style="color: red">*</b> :
                                                                </td>
                                                                <td style="width: 43%">
                                                                    <span>
                                                                        <input style="width: 50%" id="BMO_txtTitle" title="* 'Title'." onclick="" onchange="" />
                                                                    </span>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Date :
                                                                </td>
                                                                <td>
                                                                    <span>
                                                                        <input onblur="checkdate(this)" style="width: 50%" id="BMO_txtSignDate" title="Date"
                                                                            onclick="" onchange="" readonly="" maxlength="10" />
                                                                    </span>
                                                                </td>
                                                                <td>
                                                                </td>
                                                                <td>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <img src="_gfx/previous_disabled.gif" id="imgPrevious" onclick="ShowDiv('P')" alt="Previous"
                                style="display: none" />
                        </td>
                        <td style="text-align: center">
                            <input type="image" name="btnSubmit" id="btnSubmit" src="_gfx/submit.gif" onclick="if(CheckEnable()){var RsvalueCtrl = ValidateSectionControls();if(RsvalueCtrl==true){if(SetValue()){return true;}else{return false;}}else{return false;}}else{return false;};var SubmitConfirm= confirm('Do you want to Submit the form?');if (SubmitConfirm == false){return false};"
                                style="border-style: None; border-width: 0px;" />
                        </td>
                        <td style="text-align: right">
                            <img src="_gfx/next.gif" id="imgNext" onclick="ShowDiv('N')" name="imgNext" style="display: none" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr id="trMessage" style="display: none; height: 100%">
            <td style="width: 100%; height: 650px; text-align: center; vertical-align: top">
                <table style="width: 100%;" border="0">
                    <tr>
                        <td style="padding-left: 13px; width: 800px; background-repeat: no-repeat; font-family: Arial;
                            height: 168px; color: #ffffff; font-weight: bold">
                            <span style="font-size: 24px">
                                <br>
                                <br>
                                Bank Of Montreal(BMO)</span><span style="font-size: 13px"><br>
                                    <br>
                                    Hays Companies Florida, 1000S Pine Island Rd, Suite 225, Plantation, FL 33324, Phone:
                                    954-475-3600,<br>
                                    Toll Free: (800) 834-7688, Fax: 954-475-2120, or email: <a style="color: white" href="mailto: assyst@hayscompanies.com">
                                        assyst@hayscompanies.com</a></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr style="vertical-align: middle">
                        <td style="vertical-align: middle; text-align: center; color: #660033; font-size: 20px;
                            font-weight: bold">
                            Thank You!!
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle; text-align: center;">
                            Your application was&nbsp;received successfully.
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle; text-align: center;">
                            Please click&nbsp; <a id="lnkPrintView" href="javascript:__doPostBack('lnkPrintView','')">
                                here</a>&nbsp;to <font color="#660033" size="3"><b>View</b></font> or <font color="#660033"
                                    size="3"><b>Print</b></font> the Application.
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle; text-align: center;">
                            Please click&nbsp; <a id="lnkApplynow" href="javascript:__doPostBack('lnkApplynow','')">
                                here</a>&nbsp;to <font color="#660033" size="3"><b>Submit</b></font> new Application.
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle; text-align: center;">
                            Please click <a onclick="self.close();" href="#">here</a> to close this window.
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <input name="hdSession" type="hidden" id="hdSession" value="BMO" />
    <input name="hdKey" type="hidden" id="hdKey" />
    <input name="hdID" type="hidden" id="hdID" />
    <input name="hdValue" type="hidden" id="hdValue" />
    <input name="hdnCurrYear" type="hidden" id="hdnCurrYear" />
    <input name="hdnUserRight" type="hidden" id="hdnUserRight" value="True" />
    <input name="stateID" type="hidden" id="stateID" />
    <input name="professionId" type="hidden" id="professionId" />
    <input name="hdnDealershipName" type="hidden" id="hdnDealershipName" />
    <input name="hdnAddress" type="hidden" id="hdnAddress" />
    <input name="hdnCity" type="hidden" id="hdnCity" />
    <input name="hdnState" type="hidden" id="hdnState" />
    <input name="hdnZip" type="hidden" id="hdnZip" />
    <input name="hdnNewVehicleValue" type="hidden" id="hdnNewVehicleValue" />
    <input name="hdnUsedVehicleValue" type="hidden" id="hdnUsedVehicleValue" />
    <input name="hdnDemoVehicleValue" type="hidden" id="hdnDemoVehicleValue" />
    <input name="hdnRoadVehicleValue" type="hidden" id="hdnRoadVehicleValue" />
    <input name="hdnTotalInventory" type="hidden" id="hdnTotalInventory" />
    <input name="hdnContentId" type="hidden" id="hdnContentId" value="1259" />
    <input name="hdnSateNames" type="hidden" id="hdnSateNames" value="AL;Alabama#AK;Alaska#AZ;Arizona#AR;Arkansas#CA;California#CO;Colorado#CT;Connecticut#DE;Delaware#DC;District of Columbia#FL;Florida#GA;Georgia#HI;Hawaii#ID;Idaho#IL;Illinois#IN;Indiana#IA;Iowa#KS;Kansas#KY;Kentucky#LA;Louisiana#ME;Maine#MD;Maryland#MA;Massachusetts#MI;Michigan#MN;Minnesota#MS;Mississippi#MO;Missouri#MT;Montana#NE;Nebraska#NV;Nevada#NH;New Hampshire#NJ;New Jersey#NM;New Mexico#NY;New York#NC;North Carolina#ND;North Dakota#OH;Ohio#OK;Oklahoma#OR;Oregon#PA;Pennsylvania#RI;Rhode Island#SC;South Carolina#SD;South Dakota#TN;Tennessee#TX;Texas#UT;Utah#VT;Vermont#VA;Virginia#WA;Washington#WV;West Virginia#WI;Wisconsin#WY;Wyoming#" />
    <input name="hdnAffiliates" type="hidden" id="hdnAffiliates" value="1^BSH#2^CSH#3^DSH#4^HMAH#5^HNA#6^Legacy MI#7^LSH#9^M&amp;I Bank#8^PSPS#27^Test 5#25^Test User#0^Test12#" />
    <input name="hdnGroup" type="hidden" id="hdnGroup" value="2^Commercial#3^REO#1^Retail/Small Business#" />
    <script>
        if (document.getElementById("BMO_txtDescOfProperty")) {
            document.getElementById('BMO_txtDescOfProperty').value = "";
        }
    </script>
    </form>
</body>
</html>

Screenshot