Getting an error using indexOf call in Javascript on Firefox and Opera. Works fine in IE.
Following is the error message:
Action
function anonymous(Grid, Row, Col, Event) {
return Grid.ActionShowPopupMenu();
}
for event OnRightClick failed with exception: row.id.indexOf is not a function
I'm testing that a string contains another string in Javascript and using the indexOf function of a string. The calls however are being made in JQuery functions. Perhaps that is the reason for the problem? Is there an alternative to using indexOf in Javascript to test if a string contains another string? Is there a workaround for this problem?
Row
is a jQ object,.id
will be undefined/null. Either useRow.getAttr('id').indexOf()
or useRow.get(0).id.indexOf()
. If that fails, too:Row
is capitalized in your function declaration, but the exception shows a lower caserow
. JS is CaseSensitive – Identification