Madura Harshana Madura Harshana - 11 months ago 59
Javascript Question

How to check a string in JavaScript and return Boolean?

How would I convert the following statements to JavaScript?

Set oTextRange = frmSearch.OrderNumList.createTextRange()
lFound = oTextRange.FindText(aOrderNumList(nI))


lFound
should be a Boolean value.

Answer Source
var lFound = oTextRange.indexOf(aOrderNumList(nI))!=-1