Hi,
I am new to GWT. What I am trying to achieve is to have multiple
Hyperlinks in my webpage and associate a click handlers with all the
hyperlinks.
the HTML code is something like:
<div id="navhome">
<ul>
<li><a href="Home.html" >HOME</a></li>
</ul>
</div>
<div id="navcontrol">
<ul>
<li><a href="#">CONTROL</a></li>
</ul>
</div>
Now, i have some widgets in the Home.html page which i want to control
when the user clicks on "Control" hyperlink. whatever i have tried so
far has failed. the recent one is something like:
Element ControlRoom = DOM.getElementById("navcontrol");
DOM.setEventListener(ControlRoom, new EventListener (){
public void onBrowserEvent (Event event)
{
switch(DOM.eventGetType(event))
{
case Event.ONCLICK:
onClickControl();
}
}
});
}
public void onClickControl()
{
Panel.remove(Display);
}
Questions:
1. first of all, can this be achieved. As far as I am concerned, this
seems a very basic thing and should be achievable.
2. If it is achievable, can someone suggest how?
3. If not, then what are my alternatives? So far, i have though of
creating a HTML widget and use it. Not tried it yet. The other option
is to have buttons and not hyperlinks. But the problem is, using
buttons in my webpage will destroy the cosmetics.
Thanks to help.
~Diwakar
--
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.