bobo
February 14th, 2005, 08:00 AM
whithout boring you with details, the script below is a string check. If someone types "cec" in an input box, I want to check for the next character, if there is one. In this case I want the "i" from "nancy_cecile"
I get an error " Object doesn't support this property or method"
<script language="JavaScript">
var myString = "nancy_cecile";
var results = "cec";
var offset = myString.indexOF(results);
var supercheck = myString.substr((offset+2), 1);
document.write(supercheck);
</script>
I get an error " Object doesn't support this property or method"
<script language="JavaScript">
var myString = "nancy_cecile";
var results = "cec";
var offset = myString.indexOF(results);
var supercheck = myString.substr((offset+2), 1);
document.write(supercheck);
</script>