it is indexOf method:
http://www.chilisoft.com/c
Main Topics
Browse All TopicsI'm trying to convert some VBScript code into JScript code. I haven't been able to locate the JScript equivalent to InStr. Does anyone know the syntax?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
it is indexOf method:
http://www.chilisoft.com/c
there is a difference in the result, i believe based on each scripting language's implementation of what position to return. an example:
<html>
<script language="JScript">
function jsGetIndex(s) {
alert(s.indexOf("s"));
}
</script>
<script language="VBScript">
Sub vbGetIndex(s)
MsgBox Instr(s, "s")
End Sub
</script>
<body>
<input type="button" value="Test JScript" onclick="jsGetIndex('test'
<input type="button" value="Test VBScript" onclick="vbGetIndex('test'
</body>
</html>
This question has been open for some time and is now in need of wrapping up.
Please DO NOT accept this comment as the answer to the question, it is purely an alert to the fact that this question is still open.
It would be greatly appreciated if any of the participants could comment back here in order to give assistance in what the status of this question is and what should be done with it (delete, 0 PAQ, award points etc).
Kindest Regards
Ant
Business Accounts
Answer for Membership
by: dog42Posted on 2001-04-24 at 13:26:16ID: 6030227
hey, (afaik) the closest equivalent in javaScript is search()
scripting/ default.ht m?/scripti ng/ jscript /doc/jsmth search.htm
sorry, i know this is the cheats way out, but msdn explains it much better than i can
take a look at http://msdn.microsoft.com/
if you need any explaination, just ask
dog42