Row_details: string comparison problem.
Row_details: string comparison problem.

Hi there,
I am working on Row_details example
http://datatables.net/examples/api/row_details.html
The comparison with the column data values is not working. Here is the code:
[code]if(aData[1].substring(0,7) == 'value1' && aData[1].substring(7,10) == 'value2'){
}[/code]
Above aData[1].substring(0,7) gives weird value, and hence am not able to compare...
How to do comparison the right way...
Thanks
I am working on Row_details example
http://datatables.net/examples/api/row_details.html
The comparison with the column data values is not working. Here is the code:
[code]if(aData[1].substring(0,7) == 'value1' && aData[1].substring(7,10) == 'value2'){
}[/code]
Above aData[1].substring(0,7) gives weird value, and hence am not able to compare...
How to do comparison the right way...
Thanks
This discussion has been closed.
Replies
value
I had to adjust the indexes in the substring.
solved!