You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Hi everyone, I need to know how to add handler to a node or element in Html document. Suppose I am not using any widget or panel or any class of gwt. and I have something like this
<div id="i_need_clickHandler"></div>
//.........
Element ele = doc.getElementById("i_need_clickHandler");
So how can I attach a click or mouseover handler to ele.
Thanks in advance
Jens
unread,
Dec 9, 2011, 10:01:08 AM12/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
I have used
com.google.gwt.dom.client.Element e = Document.get().getElementById(...).cast();
DOM.setEventListener(e, new EventListener() {
public void onBrowserEvent(Event e) {
NativeEvent ne = e.cast();
if("click".equals(ne.getType())) {
//click event occured
}
}
});
But maybe there is a better way of doing this.
-- J.
Thomas Broyer
unread,
Dec 9, 2011, 10:15:54 AM12/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message