Gabriel_ACE:
--------------------------------------------------------------------------------
hi!
I m trying to execute this sentence
var oneFile = moreFiles.item();
var n = oneFile.search(".sel");
echo(n);
but pspad don't like "search"
idem for "includes"
var oneFile = moreFiles.item();
var n = oneFile.includes(".sel");
echo(n);
I don't understand which is the problem
--------------------------------------------------------------------------------
Hi,
it is difficult to find the cause of this problem without the rest of the code,
but there are some possibilities.
The type of the objects in questions is important - I believe, search is a
string method and performs a regex search; it most likely is not available e.g.
in an array.
incudes is an array method, but it might not be supported in all javascript
engines, e.g. MS Explorer; I thing PSPad uses this browser for WSH scripting
javascript, if it is present.
Could you possibly use indexOf in your code? (this seems more general and more
widely available).
hth,
vbr
--
<https://forum.pspad.com/read.php?2,71056,71058>
PSPad freeware editor https://www.pspad.com