Assuming the element is <div> or <spam>

    HTML html = HTML.wrap(DOM.getElementById("GWTIDSOFELEMENT"));
    html.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        System.out.println("CLICK");
      }
    });


On Jun 17, 9:35 pm, Umesh Gohil <[email protected]> wrote:
> Hi Friends,
>
> I am kind of new bee to GWT and started learning things. I want to add
> click listener to existing element in HTML.
>
> Currently I am able to get element using this method
>
> Element el = DOM.getElementById("GWTIDSOFELEMENT");
>
> But dont know how to add click Listener to this element.
>
> Appreciate if somebody can help me with code snippet or link for
> reference.
>
> Thanks
> Umesh Gohil

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to