Skip to content Skip to sidebar Skip to footer

After Jquery Table.load() Html Element Becomes Undefined

I am rewriting the post to make it clearer I have a HomeController that has the following Actions public ActionResult About() { MapDetailsRepository repMapDetail = new

Solution 1:

So the problem was that i could not get the td element with the following code

$("#MapDetails").children().children()[rowIndex]

I have solved it in a very hacky way but would love to have a neater solution

functionsetResultValue(colIndex, rowIndex, resultValue) {

if ($("#MapDetails").children().children()[rowIndex] != undefined) {
    var cell = $("#MapDetails").children().children()[rowIndex].children[colIndex];
    cell.innerHTML = resultValue;
}
else {
    var newRow = 0, newCol = 0, assessmentLength = 5, elementPos = 0;
    newRow = rowIndex - 3;
    newCol = colIndex - 4;

    elementPos = (newRow * assessmentLength) + newCol;
    $(".test").get(elementPos).innerHTML = resultValue;

}
}

.test is the class of my td as you could see in the markup

My Question on the sequence of loading script element and dom element when partial view rendering is still there

Post a Comment for "After Jquery Table.load() Html Element Becomes Undefined"