I am using the functions strpos(string, string) in javascript. In Firefox, Opera and IE the page loads fine, but in Chrome I get the error: Uncaught ReferenceError: strpos is not defined. The page I am working on is http://seniorproject.korykirk.com/0xpi2.php
+4
A:
strpos is not part of the ECMAScript Language Specification ECMA-262 3rd edition (commonly known as javascript)
Like Artelius wrote, use haystack.indexOf(needle,start) or haystack.lastIndexOf(needle,start) (where start is optional)
some
2008-11-22 03:51:24
A:
If you want to use PHP functions in javascript, use php.js
Here's strpos()
http://phpjs.org/functions/strpos:545
TRiG
2010-10-01 13:29:55