Strpos not defined in Chrome?

I am using strpos (string, string) functions in javascript. In Firefox, Opera, and IE, the page loads fine, but in Chrome I get the error message: Uncaught ReferenceError: strpos not defined. The page I'm working on is http: //s Seniorproject.korykirk.com/0xpi2.php

+4
source share
3 answers
+13
source

strpos is not part of the ECMAScript Language Specification ECMA-262 3rd edition (commonly known as javascript)

As Artelius wrote, use haystack.indexOf (needle, start) or haystack.lastIndexOf (needle, start) (where a start is optional)

+8
source

If you want to use PHP functions in javascript use php.js

Here is strpos() http://phpjs.org/functions/strpos//45

+2
source

All Articles