Subj : Re: JS problem with rhino To : Ingon From : Jon Collis Date : Tue May 13 2003 11:53 am You need to setup a DOM in order to handle this kind of thing. In particular, you are going to need a location object and you are going to have to define the function reload(boolean) as part of your location object by using FunctionObject, for example. Jon Collis Ingon wrote: > I have two frames: > frameTop > frameBottom > > in frame bottom there is following code: > > > and this causes: > TypeError: reload is not a function. (httpunit; line 2) > at > org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597) > at > org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557) > at > org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:567) > at > org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2178) > at > org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:58) > > at > com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:162) > > at > com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:52) > > at > com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:568) > at > com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaScript.java:407) > > at > com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80) > at > com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(JavaScriptEngineFactory.java:46) > > at > com.meterware.httpunit.RequestContext.runScripts(RequestContext.java:44) > at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:111) > at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:99) > at > com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:218) > > at > com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:207) > > at com.meterware.httpunit.WebForm.submit(WebForm.java:64) > at com.meterware.httpunit.WebForm.submit(WebForm.java:53) > at net.sourceforge.jwebunit.HttpUnitDialog.submit(Unknown Source) > at net.sourceforge.jwebunit.WebTester.submit(Unknown Source) > at > jp.telewave.platpark.test.store.MngShippDistRangesTC.testAddNewDistRangeValid(MngShippDistRangesTC.java:51) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:324) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestCase.run(TestCase.java:111) > at com.bianor.testrunner.objects.Test.execute(Test.java:55) > at com.bianor.testrunner.objects.Suite.execute(Suite.java:73) > at > com.bianor.testrunner.TestRunner$RunAction.run(TestRunner.java:183) > at java.lang.Thread.run(Thread.java:536) > > so is this a function or not. > I use mozilla as a web browser but with it there is no problems. > .