I want to check if a page item contains a substring ABC
.
I have tried
console.log($v("P2_ITEM1").indexOf("ABC"))
and it returns -1
even though the item does contain the substring ABC
What am I doing wrong? Is there a betetr way to do that?
I want to check if a page item contains a substring ABC
.
I have tried
console.log($v("P2_ITEM1").indexOf("ABC"))
and it returns -1
even though the item does contain the substring ABC
What am I doing wrong? Is there a betetr way to do that?
Apparently it's right. Are you sure that item contains the string "ABC", indexOf is case sensitive.
I try in this page: https://apex.oracle.com/pls/apex/f?p=145797:15:
This instruction and it's ok.
console.log($v("P15_SELECT").indexOf("lb"));
console.log($v("P15_SELECTED").indexOf("lb"));