Click to See Complete Forum and Search --> : More javascript questions


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>

bobo
February 14th, 2005, 08:02 AM
Oh ya almost forgot.... :rolleyes:

can anyone help?

bobo
February 14th, 2005, 10:54 AM
it's ok people, I figured it out
Thanks :wave: