Dear Avian Liao and JMeter Users: If the sample you put in your last message is exact, you added a backslash and replaced the comma with a double quote. Does the function need the new double quote? Try using a backslash in front of a comma. Like this:
\, Function in Message 1: ${__javaScript('${convert}'.replace(/ref%3A%3AEvent_LC%5B(\w*-\w*-\w*-\w*-\w*)%5D/,"ref::Event_LC[$1]"),showScript)} Function in Message 2: ${__javaScript('${convert}'.replace(/ref%3A%3AEvent_LC%5B(\w*-\w*-\w*-\w*-\w*)%5D/"\""ref::Event_LC[$1]"),showScript)} Message 1 with backslash followed by comma in parameter: ${__javaScript('${convert}'.replace(/ref%3A%3AEvent_LC%5B(\w*-\w*-\w*-\w*-\w*)%5D/\,"ref::Event_LC[$1]"),showScript)} Sincerely yours, Kyle -----Original Message----- From: Liao, Avian [mailto:[EMAIL PROTECTED] Sent: Thursday, December 09, 2004 3:15 PM To: JMeter Users List; sebb Subject: RE: error message when running javaScript function Hi, all users, sebb, I did what you suggest-- use "\" to escape "," in parameters ${__javaScript('${convert}'.replace(/ref%3A%3AEvent_LC%5B(\w*-\w*-\w*-\w*-\w*)%5D/"\""ref::Event_LC[$1]"),showScript)} but still get the same error message: 2004/12/09 12:11:26 ERROR - jmeter.threads.JMeterThread: SyntaxError: missing ) after argument list (<cmd>; line 1) I believe that I did not miss any ")", in my script. -----Original Message----- From: sebb [mailto:[EMAIL PROTECTED] Sent: Thursday, December 09, 2004 11:40 AM To: JMeter Users List Subject: Re: error message when running javaScript function Use "\" to escape "," in parameters. On Thu, 9 Dec 2004 14:01:40 -0500, Liao, Avian <[EMAIL PROTECTED]> wrote: > Hi, > > When I use javaScript function, I have the foolowing error message, I try to > test my javascript outside the Jmeter, and it works fine. so....what is wrong > when I copy over to Jmeter. ${convert} is my variable, and I am positive that > this varibale exists. > > ${__javaScript('${convert}'.replace(/ref%3A%3AEvent_LC%5B(\w*-\w*-\w*-\w*-\w*)%5D/,"ref::Event_LC[$1]"),showScript)} > jmeter.threads.JMeterThread: SyntaxError: missing ) after argument list > (<cmd>; line 1) > > Thanks, guys. > > Avian > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]