Thanks, I'll give that try! -- Regards,
joe Joe Casadonte [EMAIL PROTECTED] 1016 West Ninth Avenue Suite 300 King of Prussia, PA 19406 610-491-3315 > -----Original Message----- > From: Kyle McAbee [mailto:[EMAIL PROTECTED] > Sent: Monday, November 01, 2004 4:55 PM > To: JMeter Users List > Subject: RE: decoding the value of a variable -- javascript? > > > Dear Joe: > > Try putting single quotes around the variable name. > > Right for __javaScript: '${pk}'.substring > Wrong for __javaScript: ${pk}'.substring > > Sincerely yours, > > Kyle > > > > -----Original Message----- > From: Casadonte, Joe [mailto:[EMAIL PROTECTED] > Sent: Monday, November 01, 2004 11:32 AM > To: JMeter Users List > Subject: decoding the value of a variable -- javascript? > > > I have a regular expression extractor that grabs a PK value > for me, and > stores it in ${pk}. Sometimes this value has a space in it, which is > encoded (e.g. "HELLO%2BWORLD"). When I send the value back, > I need to send > it back decoded (e.g. "HELLO WORLD"). I've been fooling > around with the > __javaScript function all morning and I can't figure out how > to get it to > work on the value of a jmeter variable. Is this possible? > > This works: > > ${__javaScript(('HELLO%2BWORL'.replace('%2B'\, ' ')),xpk)} > > but this does not: > > ${__javaScript((${pk}.replace('%2B'\, ' ')),xpk)} > > Nor has any variation on it that I can think of. Is there a > way to send the > value of a jmeter variable through a javascript function? Or > is there some > other method of transforming a string that would work? > Thanks as always for > the help! > > -- > Regards, > > > joe > Joe Casadonte > [EMAIL PROTECTED] > > 1016 West Ninth Avenue > Suite 300 > King of Prussia, PA 19406 > 610-491-3315 > > --------------------------------------------------------------------- > 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]

