Hi All.
I'm trying to create what I thought would be a simple search pattern using a Javascript regular expression. However, it just won't work, even though similar expressions I've coded in Perl work just fine.
Here is my code:
<INPUT TYPE="button" NAME="Continue2" VALUE="Continue"
onclick="Javascript:document.areWeDone = verifyCustomer();
if (document.areWeDone == true)
{
re = /issued/i;
testit = re.search("issuedornot"
;
stopTheBlink (top.heading_frame.blinkMeNot.value)
document.entry.submit();
}";
STYLE="background-color:#004080; color: #FFEAD5"></INPUT>
The lines I am having problems with in this code are:
re = /issued/i;
testit = re.search("issuedornot"
;
I'm getting a syntax error on testit = re.search("issuedornot"
;
I've tried this same line using re.exec in place of re.search, and it hasn't helped.
In a nutshell, I need code to look for the word 'issued' in a string of characters. Sounds so easy, but its been giving me fits today.
The constant 'issuedornot' will be replaced with a variable as soon as I can get the regular expression to work properly. The other sections of this code have been working properly for some time...I'm just adding some new stuff into it.
Any help on this would be greatly appreciated.
Thanks!
Kathy
I'm trying to create what I thought would be a simple search pattern using a Javascript regular expression. However, it just won't work, even though similar expressions I've coded in Perl work just fine.
Here is my code:
<INPUT TYPE="button" NAME="Continue2" VALUE="Continue"
onclick="Javascript:document.areWeDone = verifyCustomer();
if (document.areWeDone == true)
{
re = /issued/i;
testit = re.search("issuedornot"
stopTheBlink (top.heading_frame.blinkMeNot.value)
document.entry.submit();
}";
STYLE="background-color:#004080; color: #FFEAD5"></INPUT>
The lines I am having problems with in this code are:
re = /issued/i;
testit = re.search("issuedornot"
I'm getting a syntax error on testit = re.search("issuedornot"
I've tried this same line using re.exec in place of re.search, and it hasn't helped.
In a nutshell, I need code to look for the word 'issued' in a string of characters. Sounds so easy, but its been giving me fits today.
The constant 'issuedornot' will be replaced with a variable as soon as I can get the regular expression to work properly. The other sections of this code have been working properly for some time...I'm just adding some new stuff into it.
Any help on this would be greatly appreciated.
Thanks!
Kathy