Madura Harshana Madura Harshana - 1 year ago 82
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))

should be a Boolean value.

Answer Source
var lFound = oTextRange.indexOf(aOrderNumList(nI))!=-1
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download