Skip to main content

JDIC 0.9.5's WebBrowser capacity to listen to java script actions

1 reply [Last post]
jasha
Offline
Joined: 2008-06-16

Hi uta and others,

Urgent help is needed. Let me first explain the scenario I have. I have implemented WebBrowser component inside of Applet thru which user navigates
various urls. When adding addWebBrowserListener to a component, I am able to control over certains actions f.ex with the following methods..

- downloadCompleted
- downloadProgress
- downloadError
- documentCompleted
- etc

but if I needed to control, say, what is happening purely on client side (via Javascript code) and when one such a client side event happens then it triggers an specific action that i can use f.ex for whatever purpose. I am aware of webBrowser's executeScript(String) method that is possible f.ex to trigger javascript alert("hello") etc. But if I needed to find out what's happening on a client side by means of javascript functions, how to achieve this goal?

br
janne

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jasha
Offline
Joined: 2008-06-16

hello jdic developers,

I am still wondering how to solve my javascript related problem. To refresh up your minds, I need to track down all the javascript events and write them onto a socket opened on jdic component residing inside my applet.

Basically i can easily track and write down all the POST/GET etc client-server events with the help of webBrowser's addWebBrowserListener implementation - with its downloadCompleted(event) etc. So POST/GET's etc are no problem in my scenario.

[b]But how to add some kind of listener to webBrowser and listen what javascript (client side) events are taking place on the component. I will have to track and write down all the javascript events as well in my applet. So is there a way to do this using jdic?[/b]

I really appreciate if you gave any hints or suggestions how to solve or approach my problem.

Br,
jasha