You need to do this:

<a href="javascript:window.jsinterface.mymethod('parameter')"> xxx </a>

In Java code:

intf = new Object {
    public void mymethod(String param) {
        ....
    }
}

myWebView.addJavascriptInterface(intf , "jsinterface");

On Mon, Apr 13, 2009 at 6:13 AM, Roy M <setesting...@gmail.com> wrote:

>
> Hello,
>
> say I have a local html invoked using webview, has the content...
>
> <a herf="foo('me')"> test </a>
>
>
> Is it possible when user click on the hyperlink, a method in my Java
> class called foo() will be called?
>
> Or any otherway to keep track if a user clicked on a specific elements
> in the HTML page?
>
>
> Thanks
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to