IE 11 - compatibility issue - Javascript Issue -

I have a webpage developed in MVC 5 using C# and visual studio 2013.  The web page relies heavily on Javascript and JQuery. It works well when used in chrome or firefox but not in IE 10 or 11. I get this undefined messages even though I have clearly defined the input elements. Any word on this? Appreciate any help given to me

undefined.JPG
<div class="col-lg-6 col-md-6 col-sm-6 " style="text-align:right ">               
    <input class="btn-vmsPrimary btn-sm" type="button" value="Save Bid" id="BidSave" onclick="saveBidItems()" />
    <input id="field_terms" type="checkbox" value="field_terms" required name="terms" title="Accept terms and conditions" hidden>
    <label id="lblTerms" for="field_terms" value="lblTerms" hidden>I accept the <u>Terms and Conditions</u></label>
    <input class="btn-vmsPrimary btn-sm" type="button" onclick="submitBid()" value="Submit Bid" id="BidSubmit" hidden />  </div>

Open in new window

Subbu GAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexandre SimõesManager / Technology SpecialistCommented:
This is a javascript error so you need to show us the js code that is throwing this error.
0
Subbu GAuthor Commented:
@Alexandre Simões
Thanks ,  here you go

 function SaveBid() {
        GetRowTotals;
        var PushedArray = new Array();
        var lista = jQuery("#list").getDataIDs();
        for (i = 0; i < lista.length; i++) {
            rowData = jQuery("#list").getRowData(lista[i]);
            PushedArray.push(rowData);

        }

        var dataToSend = JSON.stringify(PushedArray);

        $.ajax({
            url: '/Account/SaveBidData',
            type: 'POST',
            data: "volumeid=" + dataToSend,
            success: function (result) {
               // alert('result:' + result);

                var MinBidWarning = result; //'';
                if ((MinBidWarning != null) || (MinBidWarning.length > 0)) {
                    if (MinBidWarning == 'Success') {
                        field_terms.hidden = false;
                        lblTerms.hidden = false;
                        BidSubmit.hidden = false;
                    }
                }
              
            }
        });
        return true;        
    }

Open in new window

0
Alexandre SimõesManager / Technology SpecialistCommented:
On line 23:
field_terms.hidden = false;

Where is field_terms defined? Outside the SaveBid function?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Subbu GAuthor Commented:
@Alexandre Simões
Thanks ,  here you go

See my full source code

BidNow,cshtml

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>BidForm</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    
    <style>
        .modal-content {
            width: 505px !important;
            margin: 10px auto !important;
            height: 300px;
        }
    </style>

    <link href="/content/css?v=RfwW-2aQDtie_aGtJYLnMPAX5vjJy6qthDSchehOSlo1" rel="stylesheet" />
    <link rel="stylesheet" href="/content/datepicker.css">
    
    <script src="/Scripts/jquery-2.1.3.min.js"></script>
    <link href="/Content/Gridmvc.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/gridmvc.min.js" type="text/javascript"> </script>
</head>
<body>
    <a href="#maincontent"> </a>
    <div class="mainWrap container" style="background-color: #ffffff;">

        <div>
            <div class="navbar navbar-inverse som-brandbar" role="navigation" aria-label="Global Navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target=".navbar-collapse" style="border: none;">
                <div class="pull-left">
                    <span class="icon-bar"></span> <span class="icon-bar"></span><span class="icon-bar"></span>
                </div>
                <div class="pull-left">
                    &nbsp;&nbsp;<b style="color: #fff;">MENU</b>
                </div>
            </button>
            <div id="globalNav" class="collapse navbar-collapse global">
                <ul class="nav navbar-nav global-links">
                    <li class=""><a href="/">Home</a></li>
                    

                    <li><a href="http://www.michigan.gov/dnr/0,4570,7-153--24871--,00.html">Contact DNR</a></li>
                    <li><a href="http://www.michigan.gov/dnr">DNR home</a></li>
                    <li><a href="http://www.michigan.gov/dnr/0,4570,7-153--240623--,00.html ">Key Topics</a></li>

                        <li>
                            <a href="/Account/EditMyProfile" data-toggle="tooltip" data-original-title=Welcome Subbu>
                                <span class=" glyphicon glyphicon-user">
                                </span>
                            </a>

                        </li>
                </ul>
            </div>
            <!--/.nav-collapse -->
            <ul class="nav navbar-nav navbar-right">

                <li>
                    <a href="http://www.michigan.gov"
                       title="Michigan's Official Web Site">
                        <span class="icons-state"></span>
                        MI.gov
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<header class="header bottom-border-accent-A" role="banner">
    <a href="Http://www.michigan.gov/dnr" style="text-decoration:none;">
        <div class="container header-background">
            <!--link to home page-->

            <div>
                <img src="/Content/Images/DNRLogo.png" class="pull-left logo" alt="logo" />
            </div>
            <div>
                <div> <h1 class="siteTitle" style="text-align:left;">Timber Sale Online Bidding</h1></div>
                <div> <span class="tagline hidden-xs" style="align-content:center">Michigan Department of Natural Resources</span></div>
                <div class="tagline visible-xs">Michigan DNR</div>
            </div>

        </div>
    </a>
</header>
<script src="/Scripts/jquery-2.1.3.min.js"></script>
<script src="/Scripts/jquery-ui-1.11.3.min.js"></script>
<script src="/Scripts/bootstrap.min.js"></script>


        </div>


        <div class="container content_siteLayout">
            <main id="maincontent">
                






<div class="row container" title="Bid now screen">
    
    <div class="row   hidden-xs role=">
    <ul class="nav  nav-justified  navbar vms-menubar  ">
        <li id="menuVmsHome" class="  " role="group"><a href="/ " class=" btn " style="  font-family:Verdana; font-stretch:extra-expanded">Home</a></li>
        <li id="menuVmsScrchCrt" class="" role="group"><a href="/Home/vmsSearchCriteria" style="  font-family:verdana; font-stretch:extra-expanded" class=" btn">Search Criteria</a></li>
        <li id="menuVmsMyIntSrch" class=" ">

            <a href="/Account/MyInterestSearch" style="font-family:verdana; font-stretch:extra-expanded" class=" btn">My Interest Search</a>



        </li>
        <li id="menuVmsSrchAll" class=" "><a href="/Home/vmsSearchAll" style="  font-family:verdana;" class=" btn">All Available Sales</a></li>
        <li class="dropdown" style=" color:#fff">
            <a href="#" data-toggle="dropdown" class="dropdown-toggle btn " style="   font-family:verdana; font-stretch:extra-expanded">My Account <b class="caret"></b></a>
            <ul class="dropdown-menu" id="menu1">
                <li id="menuVmsLogin">
                        <a href="/Home/vmsLogout" style="  font-family:verdana; font-stretch:extra-expanded" class=" btn">Logout</a>

                </li>
                <li id="menuVmsChgPasswrd">

                    <a href="/Account/ChangePassword" style="font-family:verdana; font-stretch:extra-expanded" class=" btn">Change Password</a>

                </li>
                <li id="menuVmsEditProf">
                    <a href="/Account/EditMyProfile" style="font-family:verdana; font-stretch:extra-expanded" class=" btn">Edit My Profile Items</a>

                </li>
                <li id="menuVmsMyIntSrch">
                    <a href="/Account/MyInterestSearch" style="font-family:verdana; font-stretch:extra-expanded" class=" btn">My Interest Search</a>
                </li>
                <li id="menuVmsMyInterest">

                    <a href="/Account/MyInterests" style="font-family:verdana; font-stretch:extra-expanded" class=" btn">My Interests</a>

                <li id="menuVmsManageBids">

                        <a href="/Account/ManageMyBids" style="font-family:verdana; font-stretch:extra-expanded" class=" btn">Manage My Bids</a>

                </li>



            </ul>
        </li>
        <li class="dropdown">
                <a href="/Home/vmsLogout" style=" font-family:verdana; font-stretch:extra-expanded" class=" btn">Logout</a>


        </li>

    </ul>
</div>

    <div class="col-md-8 col-lg-8 " style="text-align:center">
        <label for="NoBidCustomer" class="vms-control-label label-danger   " title="Message for No Bid Customer. ">
            
        </label>
    

</div>
<div class="col-md-4 col-lg-4 " style="text-align:right">

        <label for="Image" class="vms-control-label" title="Welcome">Welcome Subbu 06/29/2015</label>
        <label for="Image" id="clock">  </label>
</div>
<script type="text/javascript">
    // When the document is ready
    $(document).ready(function () {
        setInterval('updateClock()', 1000);
    });
    function updateClock() {
        var currentTime = new Date();
        var currentHours = currentTime.getHours();
        var currentMinutes = currentTime.getMinutes();
        var currentSeconds = currentTime.getSeconds();

        // Pad the minutes and seconds with leading zeros, if required
        currentMinutes = (currentMinutes < 10 ? "0" : "") + currentMinutes;
        currentSeconds = (currentSeconds < 10 ? "0" : "") + currentSeconds;

        // Choose either "AM" or "PM" as appropriate
        var timeOfDay = (currentHours < 12) ? "AM" : "PM";

        // Convert the hours component to 12-hour format if needed
        currentHours = (currentHours > 12) ? currentHours - 12 : currentHours;

        // Convert an hours component of "0" to "12"
        currentHours = (currentHours == 0) ? 12 : currentHours;

        // Compose the string for display
        var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;


        $("#clock").html(currentTimeString);

    }
</script>

</div>
<legend>Bid Form</legend>
<table class="interestnote">
    <tr>
        <td class="interestnotetd">
            <b>Note:</b>  Bid/Unit Amount has to be greater than or equal to Min Bid/Unit amount.
        </td>
    </tr>
</table>
<form action="/Account/BidNow" class="form-horizontal" id="BidNowPage" method="post"><span class="field-validation-valid" data-valmsg-for="CustomError" data-valmsg-replace="true"></span><span class="field-validation-valid text-danger" data-valmsg-for="BidPerUnitMessage" data-valmsg-replace="true"></span>    <fieldset>
        <div style="background-color:gray">
            <div class=" col-lg-10 col-md-10 ">
                <div class=" form-group ">
                    <label class=" control-label" for="TIMBER_SALE_ONLINE_BIDDING">TIMBER SALE/ONLINE BIDDING</label><br />
                    <label class=" control-label" for="STATE_OF_MICHIGAN_DNR">STATE OF MICHIGAN/DNR</label>
                </div>
            </div>
            <div class="col-lg-2 col-md-2 ">
                <label class=" control-label">
                    Unit/Office Name
                </label>
                    <div class="  ">
                        Grayling Office
                    </div>
            </div>
        </div>
        <div>
            <div class="col-lg-4 col-md-4  " style="text-align:center">
                    <div class="form-group   ">
                        <label class=" control-label" for="Bid_Date_Time_">Bid Date/Time </label><br />

                        06/30/2015 10:00AM   
                    </div>
            </div>
            <div class="col-lg-4 col-md-4 " style="text-align:center">
                    <div class="form-group   ">
                        <label class=" control-label" for="Sale_Name">Sale Name</label><br />
                        NANCY BROWN ASPEN RED PINE
                    </div>
            </div>
            <div class="col-lg-4 col-md-4  " style="text-align:center">
                    <div class="form-group   ">
                        <label class=" control-label" for="Bidder">Bidder</label><br />
                        Subbu Gomathinathan

                    </div>            </div>
        </div>
    </fieldset>
    <div align="center">
        <table id="list"></table>
        <div id="pager"></div>
        <br />
    </div>
    <fieldset>
        <div>
            <div class="col-lg-3 col-md-3  " id="divBidInstr">
                <p class="text-info h5 text-justify" style="font-family:'Arial, Helvetica, sans-serif'">  <a href="#" target="_blank" style="color:blue"> Bid Instructions  </a></p>
            </div>
            <div class="col-lg-9 col-md-9  " id="divBidInstr" style="text-align:right" hidden>
                <label class=" control-label" for="Note:_Bid_Unit_Amount_has_to_be_greater_than_or_equal_to_Min_Bid_Unit_amount">Note: Bid/Unit Amount has to be greater than or equal to Min Bid/Unit amount</label><br />
            </div>
        </div>
        <div class="col-lg-12 col-md-12  " id="divSubmit">
            <br />
            <b> * The Total volume is statistcally estimated within plus(+) or minus (-)9.06 percent. </b> The estimated units are final and not subject to adjustment.  Prospective bidders are urged to examine
            the timber and to make their own estimates of quantity and quality. <br />
            I understand that any or all bids may be rejected.  All non-responsive bid forms may be rejected.  I also understand that consideration and awarding 
            a contract will be based upon my past performance and ability to complete the contract based upon equipment and staffing subject to my control.  The Winning bidder must complete the verification of workers' disability compensation act compliance within 21 days of sale award date.<br />
            In response to the notice of sale to be held on<b> 06/30/2015 </b> at  <b>  10:00AM    </b> (local time).  I am hereby submitting my sealed bid (firm offer) for following forest products to be cut.
           <br /><br />
            <div class="col-lg-6 col-md-6 col-sm-6 hidden-xs" style="text-align:right">
                <input class="btn-vmsPrimary btn-sm" type="button" value="Back" id="btnBack" onclick="btnBack_click()" />
                
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 " style="text-align:right ">               
                    <input class="btn-vmsPrimary btn-sm" type="button" value="Save Bid" id="BidSave" onclick="saveBidItems()" />
                    <input id="field_terms" type="checkbox" value="field_terms" required name="terms" title="Accept terms and conditions" hidden>
                    <label id="lblTerms" for="field_terms" value="lblTerms" hidden>I accept the <u>Terms and Conditions</u></label>
                    <input class="btn-vmsPrimary btn-sm" type="button" onclick="submitBid()" value="Submit Bid" id="BidSubmit" hidden />
              
            </div><br />

            <div id="dialog"></div>

        </div>
    </fieldset>
</form>

<style>
    .noclose .ui-dialog-titlebar-close {
        display: none;
    }
    
.ui-jqgrid-bdiv
{
overflow-x : hidden !important;
}
</style>



<link href="/Scripts/jqGrid/jquery-ui-1.8.1.custom.css" rel="stylesheet" />
<link href="/Scripts/jqGrid/ui.jqgrid.css" rel="stylesheet" />
<script src="/Scripts/jqGrid/js/i18n/grid.locale-en.js"></script>
<script src="/Scripts/jqGrid4.8.2/js/jquery.jqGrid.min.js"></script>
<link href="/Scripts/jqGrid/themes/jquery-ui.css" rel="stylesheet" />


<script type="text/javascript">


    if (window.addEventListener) {  // all browsers except IE before version 9
        window.addEventListener("beforeunload", OnBeforeUnLoad, false);
    }
    else {
        if (window.attachEvent) {   // IE before version 9
            window.attachEvent("onbeforeunload", OnBeforeUnLoad);
        }
    }

    // the OnBeforeUnLoad method will only be called in Google Chrome and Safari
    function OnBeforeUnLoad() {
        return "All data that you have entered will be lost!";
    }


    function SaveBid() {
        GetRowTotals;
        var PushedArray = new Array();
        var lista = jQuery("#list").getDataIDs();
        for (i = 0; i < lista.length; i++) {
            rowData = jQuery("#list").getRowData(lista[i]);
            PushedArray.push(rowData);

        }

        var dataToSend = JSON.stringify(PushedArray);

        $.ajax({
            url: '/Account/SaveBidData',
            type: 'POST',
            data: "volumeid=" + dataToSend,
            success: function (result) {
               // alert('result:' + result);

                var MinBidWarning = result; //'';
                if ((MinBidWarning != null) || (MinBidWarning.length > 0)) {
                    if (MinBidWarning == 'Success') {
                        field_terms.hidden = false;
                        lblTerms.hidden = false;
                        BidSubmit.hidden = false;
                    }
                }
              
            }
        });
        return true;        
    }


    function saveBidItems() {
        // Save functionality
        var flag = MinBidCheckWarning();
      //  alert(flag);
        if (flag) {
         //   alert('calling : SaveBid')
            SaveBid();
        }
        
    }

    function MinBidCheckWarning() {

        var grid = $("#list");
        var MinBidPerUnitArray = grid.getCol('MinBidPerUnit');
        var EstVolumeArray = grid.getCol('Volume');
        var EnteredBidArray = grid.getCol('BidPerUnit');
        var AlertText = '';

        var CalBidArray = grid.getCol('BidValue');
        var rowids = grid.getDataIDs();

        for (var i = 0; i < EstVolumeArray.length; i++) {
            var EnteredBid = EnteredBidArray[i].replace("$", "");
            CalBidArray[i] = (EstVolumeArray[i] * EnteredBid);

            MinBidPerUnitcellValue = grid.jqGrid('getCell', rowids[i], 'MinBidPerUnit');
            MinBidPerUnitcellValue = MinBidPerUnitcellValue.replace("$", "");
            MinBidPerUnitcellValue = parseFloat(MinBidPerUnitcellValue);

            EnteredBidcellValue = grid.jqGrid('getCell', rowids[i], 'BidPerUnit');
            EnteredBidcellValue = EnteredBidcellValue.replace("$", "");
            EnteredBidcellValue = parseFloat(EnteredBidcellValue);

            grid.jqGrid('setCell', rowids[i], 'BidValue', CalBidArray[i]);            
            var check = isNaN(EnteredBidcellValue);
            //alert('check:' + check);
            if (check == true) {
                // PleaseEnterBid();
               // alert("Please enter a valid input and hit save bid.");
                return false;
            }
            else {
               // alert('EnteredBidcellValue :' + EnteredBidcellValue)
                if (EnteredBidcellValue == '0' || EnteredBidcellValue == '0.00' || EnteredBidcellValue < '0.00') {
                    grid.jqGrid('setCell', rowids[i], 'BidPerUnit', ' ');
                    return false;

                }
                if ((EnteredBidcellValue != '') || (EnteredBidcellValue != null) || (EnteredBidcellValue != 0)) {
                    if (EnteredBidcellValue < MinBidPerUnitcellValue) {
                        AlertText = 'Bid/Unit Amount has to be greater than or equal to Min Bid/Unit amount';
                        MinBidWarnDialog();
                        return false;
                    }
                }

            }
           
        }
       // alert('handing over control');
        return true;
    }

    function isNumber(n) {
        return !isNaN(parseFloat(n)) && isFinite(n);
    }

    function PleaseEnterBid() {

        $("#pleaseenterbid").dialog({
            bgiframe: true,
            resizable: false,
            height: 140,
            modal: true,
            dialogClass: "noclose",
            title: 'Error: Enter Bid Value ',
            overlay: {
                backgroundColor: '#000',
                opacity: 0.5
            },
            buttons: {
                'Please enter a valid input and hit save bid': function () {
                    $(this).dialog('close');

                },
                OK: function () {
                    $(this).dialog('close');
                }
            }
        }
        )
    };



        function MinBidWarnDialog() {

            $("#dialog").dialog({
                bgiframe: true,
                resizable: false,
                height: 140,
                modal: true,
                dialogClass: "noclose",
                title: 'Error: Minimum Bid/Unit Amount ',
                overlay: {
                    backgroundColor: '#000',
                    opacity: 0.5
                },
                buttons: {
                    'Bid/Unit Amount has to be greater than or equal to Min Bid/Unit amount': function () {
                        $(this).dialog('close');
                    
                    },
                    OK: function () {
                        $(this).dialog('close');
                    }
                }
            }
            )
        };

    function btnBack_click() {
        //$("#dialog.ui-dialog-titlebar-close", ui).hide();
        //alert('In btnBack');
        $("#dialog").dialog({
            bgiframe: true,
            resizable: false,
            height: 140,
            modal: true,
            dialogClass: "noclose",
            title: 'Are you sure you want to go back? ',
            overlay: {
                backgroundColor: '#000',
                opacity: 0.5
            },
            buttons: {
                'Any changes to Bid Amount will be lost. Please save the bid using Save button.  ': function () {
                    $(this).dialog('close');
                    ;
                },
                Cancel: function () {
                    $(this).dialog('close');
                },
                Back: function () {
                    $(this).dialog('close');
                    history.go(-1);
                    return false;
                }

            }
        }
        )
    };

    

    var nullFormatter = function (cellvalue) {
        if (cellvalue === undefined || isNull(cellvalue)) {
            cellvalue = 'NULL';
        }
        return cellvalue;
    }
</script>

<script>

    $(document).ready(function () {
        var myGrid = $("#list");

        jQuery("#list").jqGrid({
            //data: mydata,
            datatype: 'json',
            height: 150,
            rowNum: 999999,

            scroll: true,
            colNames: ['Appraisal Id', 'ProposalId', 'Species', 'Product', 'Unit', 'Volume*', 'Min Bid/Unit', 'Bid/Unit', 'Advertised Value', 'Bid Value', 'bid_flag',''],
            colModel: [
                        { name: 'Appraisal_id', index: 'Appraisal_id', hidden: true, sortable: false },
                        { name: 'ProposalId', index: 'ProposalId', hidden: true },
                        { name: 'Species', width: 150, index: 'Species', sortable: false},
                        { name: 'Product', width: 120, index: 'Product', sortable: false },
                        { name: 'Unit', width: 80, index: 'Unit', sortable: false },
                        { name: 'Volume', index: 'Volume', align: "right", sortable: false },
                        { name: 'MinBidPerUnit', index: 'MinBidPerUnit', sortable: false, align: "right", sorttype: "float", formatter: 'currency', formatoptions: { prefix: '$' } },
                        { name: 'BidPerUnit', index: 'BidPerUnit', editable: true, sortable: false, align: "right", defaultValue: 'null'},
                        { name: 'AdvertisedPrice', index: 'AdvertisedPrice', width: 150, sortable: false, formatter: 'currency', formatoptions: { prefix: '$', thousandsSeparator: ',' }, align: "right", sorttype: "float" },
                        { name: 'BidValue', index: 'BidValue', sortable: false, align: "right", sorttype: "float", formatter: 'currency', formatoptions: { prefix: '$' } },
                        { name: 'bid_flag', index: 'bid_flag', hidden: true, sortable: false },
                        { name: 'action', index: 'action', width: 25 }


            ],
            gridview: true,
            altRows: false,
            scrollOffset: 1,          
            scrollingRows: false,                    
            shrinkToFit: true,
            forceFit: true,
            editbutton: true,           
            onSelectRow: saveEdit,            
            width: 800,
            multiselect: false,
            footerrow: true,
            caption: "Bid Items",
            onCellSelect: function (rowid, iCol, cellcontent) {
               GetRowTotals;            },
            beforeSelectRow: function (rowid, e) {                
                return (true);
            },
            cellEdit: true,
            cellsubmit: 'clientArray',
            afterSaveCell: function () {               
                MinBidCheckWarning();              
            },
            afterEditCell: function () {               
                GetRowTotals();
            },
            url: "../Account/GetData",
            editurl: "../Account/SaveBidData",
            gridComplete: GetRowTotals
        });       
        var myGrid = $("#list");

    });

   



    function GetRowTotals() {
        {
           
            jQuery('tr#' + rowid + ' td:last div:first div.ui-inline-edit', jQuery(this)).show();          
            var grid = $("#list");
            var BidValueArray = grid.getCol('BidValue');
            var AdvertisedPriceArray = grid.getCol('AdvertisedPrice');
            var rowids = grid.getDataIDs();
            var BidValuetotal = 0;
            grid.setCell(rowid, 'BidPerUnit', '', { 'background': '#F3F781' });
            var AdvertisedPricetotal = 0;
            for (var i = 0; i < BidValueArray.length; i++) {
                BidValuetotal += BidValueArray[i] << 0;
            }
            for (var i = 0; i < AdvertisedPriceArray.length; i++) {
                AdvertisedPricetotal += AdvertisedPriceArray[i] << 0;
            }
            grid.footerData('set', { Species: 'Total:', BidValue: parseFloat(BidValuetotal) || 0, AdvertisedPrice: parseFloat(AdvertisedPricetotal) || 0 }, 'number');

            var BidFlagArray = grid.getCol('bid_flag');
            for (var i = 0; i < BidFlagArray.length; i++) {
                var bidFlagVal = BidFlagArray[i]
                if (bidFlagVal != 0) {
                    var rowid = rowids[i];
                  //  grid.setCell(rowid, 'BidPerUnit', '', { 'background': '#F3F781' });
                    grid.setCell(rowid, 'Species', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'Product', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'Unit', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'Volume', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'MinBidPerUnit', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'AdvertisedPrice', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'BidValue', '', { 'background': '#D8D8D8' });
                  


                }
               
                if (bidFlagVal == 0) {
                    //make it non editable when bid_flag = 0
                    var rowid = rowids[i];
                    grid.setCell(rowid, 'BidPerUnit', '', 'not-editable-cell', { editable: false });
                    grid.setCell(rowid, 'Action', '', 'not-editable-cell', { disabled: true });
                    grid.setCell(rowid, 'BidPerUnit', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'Species', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'Product', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'Unit', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'Volume', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'MinBidPerUnit', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'AdvertisedPrice', '', { 'background': '#D8D8D8' });
                    grid.setCell(rowid, 'BidValue', '', { 'background': '#D8D8D8' });
                    jQuery('tr#' + rowid + ' td:last div:first div.ui-inline-edit', jQuery(this)).hide();
                }
            }
            $("#" + $.jgrid.jqID(rowids[0]) + "_BidPerUnit").focus();
            var EnteredBidArray = grid.getCol('BidPerUnit');
            var EntBidDollarPrefix = '';
            for (var i = 0; i < EnteredBidArray.length; i++) {
                var EnteredBidcellValue = grid.jqGrid('getCell', rowids[i], 'BidPerUnit');
                EnteredBidcellValue = parseFloat(EnteredBidcellValue);
                EntBidDollarPrefix = '';
                EntBidDollarPrefix = '$' +parseFloat(EnteredBidcellValue);
                //Set Bidvalue 0 to emnpty
                if ((EnteredBidcellValue == 0) || (EnteredBidcellValue == 0.00)) {
                    grid.jqGrid('setCell', rowids[i], 'BidPerUnit', ' ');

                }
                if (EnteredBidcellValue > 0) {
                    grid.jqGrid('setCell', rowids[i], 'BidPerUnit', EntBidDollarPrefix);

                }

            }

        }
    }


    


    function saveEdit(id) {
        var grid = $("#list");
        var MinBidPerUnitArray = grid.getCol('MinBidPerUnit');
        var EstVolumeArray = grid.getCol('Volume');
        var EnteredBidArray = grid.getCol('BidPerUnit');
        var AlertText = '';

        var CalBidArray = grid.getCol('BidValue');
        var rowids = grid.getDataIDs();

        for (var i = 0; i < EstVolumeArray.length; i++) {
            var EnteredBid = EnteredBidArray[i].replace("$", "");
            CalBidArray[i] = (EstVolumeArray[i] * EnteredBid);

            MinBidPerUnitcellValue = grid.jqGrid('getCell', rowids[i], 'MinBidPerUnit');
            MinBidPerUnitcellValue = MinBidPerUnitcellValue.replace("$", "");
            MinBidPerUnitcellValue = parseFloat(MinBidPerUnitcellValue);
            
            EnteredBidcellValue = grid.jqGrid('getCell', rowids[i], 'BidPerUnit');
            EnteredBidcellValue = EnteredBidcellValue.replace("$", "");
            EnteredBidcellValue = parseFloat(EnteredBidcellValue);

            var flag = isNumber(EnteredBidcellValue);

            var flagEnteredBidcellValue = isNumber(EnteredBidcellValue);
            grid.jqGrid('setCell', rowids[i], 'BidValue', CalBidArray[i]);

            //Set Bidvalue 0 to emnpty
            if (EnteredBidcellValue == '0' || EnteredBidcellValue == '0.00') {
                grid.jqGrid('setCell', rowids[i], 'BidPerUnit', ' ');

             }

            if ((EnteredBidcellValue != 0) && (EnteredBidcellValue < MinBidPerUnitcellValue)) {
                AlertText = 'Bid/Unit Amount has to be greater than or equal to Min Bid/Unit amount';
                MinBidWarnDialog();
            }
            GetRowTotals();
        }

       
    }
    






    calculateTotal = function () {
        //  alert("calculateTotal")
        var PushedArray = new Array();
        var lista = jQuery("#grid").getDataIDs();
        for (i = 0; i < lista.length; i++) {
            rowData = jQuery("#grid").getRowData(lista[i]);
            PushedArray.push(rowData);

        }

        var dataToSend = JSON.stringify(PushedArray);
        //alert(dataToSend);
        $.ajax({
            url: '/Account/SaveBidData',
            type: 'POST',
            data: "volumeid=" + dataToSend,
            success: function (result) {
                var grid = $("#grid");
                //$grid.trigger("reloadGrid");
                // alert('success');
                //$("#grid").setGridParam({ page: 1 }).trigger("reloadGrid")
                location.reload();
            }
        });
        return true;

    };

        function submitBid() {
            $.ajax({
                url: '/Account/SubmitFinalBid',
                type: 'POST',
                data: "SubmitBidFinal",
                success: function (result) {
                    // alert('success');
                    window.location.href = '/Account/BidSuccessConfirmation';
                   }

            })
        };

      

        

    function editRow(id) {
        //alert(id);
        //debugger;
        if (id && id !== lastSelection) {
            var grid = $("#grid");
            grid.jqGrid('restoreRow', lastSelection);
            grid.jqGrid('editRow', id, { keys: true, focusField: 6 });
            lastSelection = id;
        }
    };

</script>

<style type="text/css">
    input[type="checkbox"]:required:invalid + label {
        color: red;
    }

    input[type="checkbox"]:required:valid + label {
        color: green;
    }
</style>

            </main>
        </div>

        
        
    <script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>


    </div>
    <footer>
        <div class="vms-footer container" >
    <ul class="footer-links">
        <li class="footer-link-trail ">
            <a href="/" style="color:#467AB7"
               class="footer-link-short" title="Timber Sale Online Bidding Home Page">Home</a>
        </li>
        <li class="footer-link-trail">
            <a href="http://www.michigan.gov/DNR" style="color:#467AB7"
               class="footer-link-short" title="Michigan's Official Web Site">DNR Home</a>
        </li>
        <li class="footer-link-trail">
            <a href="http://www.michigan.gov/openmichigan/0,4648,7-266-58520---,00.html" style="color:#467AB7"
               class="footer-link-short">Spending & Accountability</a>
        </li>
        <li class="footer-link-trail">
            <a href="http://www.michigan.gov/lara/0,4601,7-154-35738---,00.html" style="color:#467AB7"
               class="footer-link-short">Office of Regulatory Reinvention</a>
        </li>
        <li class="footer-link-trail"><a href="http://www.michigan.gov/dnr/0,1607,7-153-42199_43145---,00.html" class="footer-link-short" style="color:#467AB7">Report All Poaching 1-800-292-7800</a></li>
        <li class="footer-link-trail">
            <a href="http://www.michigan.gov/" style="color:#467AB7" class="footer-link-short">Michigan.gov Home</a>
        </li>
        <li class="footer-link-trail"><a href="http://www.michigan.gov/minewswire/" style="color:#467AB7" class="footer-link-short">Michigan News</a></li>
        <li class="footer-link-trail">
            <a href="http://www.michigan.gov/dnr/0,4570,7-153--281460--,00.html" style="color:#467AB7" class="footer-link-short">Policies</a>
        </li>
        <li class="footer-link-trail">
            <a href="http://www.michigan.gov/som/0,4669,7-192-29938-115596--,00.html" style="color:#467AB7" class="footer-link-short" >Michigan.gov Survey</a>
        </li>
        <li class="footer-link-trail">
            Copyright  <span id="current-year">  2015</span> State of Michigan
        </li>
    </ul>
    <p class="" >
        
    </p>
</div>
    </footer>
    

    <script type="text/javascript">
        $(function () {
            // Initialize numeric spinner input boxes
            //$(".numeric-spinner").spinedit();

            // Initalize modal dialog
            // attach modal-container bootstrap attributes to links with .modal-link class.
            // when a link is clicked with these attributes, bootstrap will display the href content in a modal dialog.
            $('body').on('click', '.modal-link', function (e) {
                e.preventDefault();
                $(this).attr('data-target', '#modal-container');
                $(this).attr('data-toggle', 'modal');
            });

            // Attach listener to .modal-close-btn's so that when the button is pressed the modal dialog disappears
            $('body').on('click', '.modal-close-btn', function () {
                $('#modal-container').modal('hide');
            });

            //clear modal cache, so that new content can be loaded
            $('#modal-container').on('hidden.bs.modal', function () {
                $(this).removeData('bs.modal');
            });

            $('#CancelModal').on('click', function () {
                return false;
            });
        });
    </script>

<!-- Visual Studio Browser Link -->
<script type="application/json" id="__browserLink_initializationData">
    {"appName":"Internet Explorer","requestId":"1d526715e1bf447baf778fa0b113e3f0"}
</script>
<script type="text/javascript" src="http://localhost:60921/d2a417c10db3450d9e96fa26e247587c/browserLink" async="async"></script>
<!-- End Browser Link -->

</body>
</html>

Open in new window

0
Subbu GAuthor Commented:
And also I get this java script on load of this form
length-error.JPG
0
Alexandre SimõesManager / Technology SpecialistCommented:
I still don't see where the field_term variable is declared.

And that hidden property is what?
Shouldn't it be something like:
$('#field_terms').hide();

Open in new window


Are you sure this works in other browsers?
Because Chrome doesn't popup alerts like IE, it hides the errors. You need to open the dev tools to see them (F12).

In my opinion, the whole block should be:
                    if (MinBidWarning == 'Success') {
                        $('#field_terms').hide();
                        $('#lblTerms').hide();
                        $('#BidSubmit').hide();
                    }

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Subbu GAuthor Commented:
@Alexandre Simões

Thanks for your reply. I appreciate your help.  If you search for field_terms in your text editor , you will find it. on load of the page I am hiding these controls and on successful validation, I will enable this one after savebid() is clicked.  IE only pop outs the javascript errors.  Javascript errors dont show up in firefox and chrome, it works and unhides the controls I want.

Declarations
 <div class="col-lg-6 col-md-6 col-sm-6 " style="text-align:right ">               
                    <input class="btn-vmsPrimary btn-sm" type="button" value="Save Bid" id="BidSave" onclick="saveBidItems()" />
                    <input id="field_terms" type="checkbox" value="field_terms" required name="terms" title="Accept terms and conditions" hidden>
                    <label id="lblTerms" for="field_terms" value="lblTerms" hidden>I accept the <u>Terms and Conditions</u></label>
                    <input class="btn-vmsPrimary btn-sm" type="button" onclick="submitBid()" value="Submit Bid" id="BidSubmit" hidden />
              
            </div><br />

Open in new window

0
Subbu GAuthor Commented:
$('#field_terms').show();
                        $('#lblTerms').show();
                        $('#BidSubmit').show();      


these lines fixed this problem
0
Subbu GAuthor Commented:
Thanks Alexandre Simões for your idea. I used your lead to find my answer. below is what I used

  $('#field_terms').show();
                        $('#lblTerms').show();
                        $('#BidSubmit').show();                    
                    }
0
Slick812Commented:
was going to comment  before, but got side tracked,  
@Subbu G    Since this Microsoft MVC is not working in IE 11 (a Microsoft product), and works in firefox, then It may be that you need to "UPDATE" the visual studio web MVC to a new ver or cast, IE 11 was greatly changed from previous IE, and your current MVC may not have the factors that are needed for the new IE 11 ? ?  Although you found a jquery substitute to show the lblTerms this may not do anything for any underlying problems with IE 11 that showed up here.
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.