From: Mike B. <mb...@Ga...> - 2003-03-31 20:25:32
|
I would expect that your code to identify which browser is in use will give you the wrong result. Even though you can specify which browser version you're using, HtmlUnit doesn't fully implement all the browser specific behaviour. Some parts will work, some won't. > HM_DOM = (document.getElementById) ? true : false; > HM_NS4 = (document.layers) ? true : false; > HM_IE = (document.all) ? true : false; > HM_IE4 = HM_IE && !HM_DOM; > HM_Mac = (navigator.appVersion.indexOf("Mac") != -1); > HM_IE4M = HM_IE4 && HM_Mac; > HM_IsMenu = (HM_DOM || HM_NS4 || (HM_IE4 && !HM_IE4M)); Off the top of my head... HM_DOM will be true HM_NS4 will be false HM_IE will be true HM_Mac will be false So document.write() should get executed. > The other possibilities are that HM_IsMenu is true but that HtmlUnit > doesn't handle function prototyping like defining trim(), That would be up to the rhino engine and honestly I have no idea if it does or not. I didn't even know you could do that. > or that one > imported Javascript page cannot call a method that resides in another > imported Javascript page. That should work. > JavaScriptException value = ======= EXCEPTION START ======== > EcmaError: lineNumber=[250] column=[0] lineSource=[null] name=[TypeError] > sourceName=[/QRSGUI/rockworld/javascript/AddSelectionCode.js] > message=[undefined is not a function.] errorObject=[TypeError: undefined is > not a function.] What is on line 250 of /QRSGUI/rockworld/javascript/AddSelectionCode.js? Is that the errorCheck() method you included earlier? -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |