On 25/06/2009, arjun786us <[email protected]> wrote: > > Hi, > > I am using a BSF sampler in my JMeter test. I am specifying a javascript > from my bin folder. > the javascript is as follows > ---geturl.js----- > var message=sayHello(); > message; > > function sayHello() { > var some = "Hello"; > return some; > } > ------------------ > this runs fine. > > but when I try to reference other javascript file in my original js file, I > get the error > > Response message: org.apache.bsf.BSFException: JavaScript Error: Internal > Error: org.mozilla.javascript.EcmaError: ReferenceError: "load" is not > defined. > > > the new geturl.js file is as follows > > ---geturl.js---- > load('hi.js'); > var message=sayHi(); > message; > ------------ > and > ----hi.js--- > function sayHi() { > some = "Hi"; > return some; > } > --------- > > Rhino documentation at http://www.mozilla.org/rhino/shell.html have > suggested using load, but that seems to be a problem. > > Please advice if there is any other way to reference external js files. If I > skip the 'load' line , I get the function undefined error (the hi.js and > geturl.js are in the bin directory)
AFAIK, load() is only available to the Rhino shell. > Thanks > Arjun > > -- > View this message in context: > http://www.nabble.com/BSF-Sampler-Javascript-ReferenceError-tp24211672p24211672.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]

