Posted By:
Anonymous
Posted On:
Tuesday, November 7, 2006 04:39 AM
I am using Eclipse browser in my application, it works fine with non java script page(URL), but amy application hangs when I try to load java script page. Here is the code Composite container = new Composite(parent, SWT.NONE); container.setLayout(new FillLayout()); browser = new Browser(container, SWT.NONE); browser.setUrl("http://192.168.1.41"); I also tried OLE objects instead of browser, but the result is same. Here is the code OleFrame frame = new OleFrame(container, SWT.NONE); OleControlSite controlSite = new OleControlSite(frame, SWT.NONE, "Shell.Explorer"); OleAutomation automation = new OleAutomation(controlSite); controlSite.doVer
More>>
I am using Eclipse browser in my application, it works fine with non java script page(URL), but amy application hangs when I try to load java script page.
Here is the code
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new FillLayout());
browser = new Browser(container, SWT.NONE);
browser.setUrl("http://192.168.1.41");
I also tried OLE objects instead of browser, but the result is same.
Here is the code
OleFrame frame = new OleFrame(container, SWT.NONE);
OleControlSite controlSite = new OleControlSite(frame, SWT.NONE, "Shell.Explorer");
OleAutomation automation = new OleAutomation(controlSite);
controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
int[] rgdispid = automation.getIDsOfNames(new String[]{"Navigate", "URL"});
int dispIdMember = rgdispid[0];
Variant[] rgvarg = new Variant[1];//this is the URL parameter
rgvarg[0] = new Variant("http://192.168.1.41/");
Variant pVarResult = automation.invoke(dispIdMember, rgvarg);
rgvarg[0].dispose();
Kindly let me know where I am wrong...
Thanks
<<Less