locked
Javascript not run at last line RRS feed

  • Question

  • User363578564 posted

    Summary of the problem I am having:

    the javascript can be run except the last line, completely no popup!

    Could anyone tell me why?  I tested at at VS2015.  Thanks a lot.

    Error I am receiving:

    no error

    My code:

            function ConfirmRemove() {
                var fail = 0
                var success = 0
                var gv = document.getElementById("<%=GridView1.ClientID%>")
                for (i = 1; i < gv.rows.length; i++) {
                    var cb = gv.rows(i).cells[1].childNodes[1];
                    if (cb.checked == true) {
                        if (gv.rows(i).cells[7].innerHTML == '&nbsp;') {
                            alert('error at row ' + i);
                            fail = fail + 1
                        }
                        else {
                            success = success + 1
                        }
                    }
                }
                alert('Not run here!');
            }

    Friday, March 23, 2018 6:13 AM

Answers

  • User363578564 posted

    sorry,  found what's wong

    the last line of GV is footer and has no checkbox

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 23, 2018 6:28 AM