Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 23443 invoked from network); 1 Nov 2004 21:54:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Nov 2004 21:54:41 -0000 Received: (qmail 90261 invoked by uid 500); 1 Nov 2004 21:54:40 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 89832 invoked by uid 500); 1 Nov 2004 21:54:38 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 89819 invoked by uid 99); 1 Nov 2004 21:54:38 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [65.126.5.231] (HELO Underdog.treev.com) (65.126.5.231) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 01 Nov 2004 13:54:37 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: decoding the value of a variable -- javascript? Date: Mon, 1 Nov 2004 16:54:33 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: decoding the value of a variable -- javascript? Thread-Index: AcTAMHbp4x/dTJNRT16UTHidsqIR2QAGjjAQ From: "Kyle McAbee" To: "JMeter Users List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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:JCasadonte@glog.com] 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! --=20 Regards, joe Joe Casadonte jcasadonte@glog.com 1016 West Ninth Avenue Suite 300 King of Prussia, PA 19406 610-491-3315 --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org