function CheckNumber(lnk) {
var row = lnk.parentNode.parentNode;
var rowindex = row.rowIndex - 1;
var i, CellValue, Row, td;
i = parseInt(rowindex);
var table = document.getElementById('<%=Gridview1.ClientID %>');
Row = table.rows[i];
td = Row.cells[4];
CellValue = td.children[0].attributes[0].value;
var field2 =parseInt(document.getElementById(CellValue).innerText);
td = Row.cells[9];
CellValue = td.children[0].attributes[0].value;
var field4 = parseInt(document.getElementById(CellValue).innerText);
if (field4 > field2)
alert("Please Check Loan Chemical Qty V/S Given Chemical Qty...!");
return false;
}
Hope it helps.
If my solution works for you, please mark it as answer! It will help others.
Get more information: http://codemovement.pk
Member
399 Points
1101 Posts
Javscript not working onmouseover
Nov 09, 2016 09:22 AM|asp.ambur|LINK
Hello
This is my ASP Page
On button mouse over validation not working why
All-Star
15186 Points
3888 Posts
Re: Javscript not working onmouseover
Nov 09, 2016 01:23 PM|raju dasa|LINK
Hi,
check the button has onmouseover at clientside (browser).
check browser console for any errors after mouseover.
check parentNode.parentNode is a <tr> tag, and it has rowIndex property.
rajudasa.blogspot.com || rajudasa-tech
All-Star
52101 Points
23237 Posts
Re: Javscript not working onmouseover
Nov 09, 2016 02:01 PM|mgebhard|LINK
Basically, the script is tightly bound to the HTML which his not good design. If the HTML structure changes then you 'll need to update the script.
There is no way that anyone on these forums can tell you why the code is not work because we cannot see the HTML.
I suggest that you take advantage of Developer Tools (F12) to debug your work. All major bowers have this feature.
https://developer.chrome.com/devtools
Also, JQuery makes querying the DOM much easier as it uses selectors rather than hardcoded approach.
Contributor
2340 Points
807 Posts
Re: Javscript not working onmouseover
Nov 09, 2016 02:51 PM|codemovement.pk|LINK
Please check below mention code.
Hope it helps.
Get more information: http://codemovement.pk
Thanks,