Element element = DOM.createElement("<a NAME=\""+(anchorName == null ?
"" : anchorName)+"\"></a>");You would have to create the anchor like this in IE but it does not work for Firefox. On Dec 19, 10:59 am, obesga <[email protected]> wrote: > ///**** I don't like to re-post, but here's the complete code of what > I'm trying to to *****/// > > public class AnchorsPanel extends Composite { > > private FlowPanel fpLinks; > private VerticalPanel verticalPanel; > > public AnchorsPanel() { > verticalPanel = new VerticalPanel(); > verticalPanel.setStylePrimaryName("caronte-VerticalTabPanel- > VPanel"); > fpLinks = new FlowPanel(); > verticalPanel.add(fpLink); > this.initWidget(verticalPanel); > } > > // ADD A WIDGET > public void addTab(String name, String refName, Widget widget) { > HTMLLinkSource sourceLink = new HTMLLinkSource(name,refName); > HTMLLinkTarget targetLink = new HTMLLinkTarget(name,refName); > fpLinks.add(sourceLink); > verticalPanel.add(targetLink); > verticalPanel.add(widget); > } > > // CLASS FOR LINK > public class HTMLLinkSource extends Widget { > > public HTMLLinkSource(String text, String anchorName) { > Element element = DOM.createAnchor(); > setElement(element); > DOM.setElementAttribute(element, "href", anchorName == > null ? "" : "#" + anchorName); > DOM.setInnerText(element, text == null ? "" : text); > } > > } > > // CLASS FOR TARGET > public class HTMLLinkTarget extends Widget { > > public HTMLLinkkDestino(String text, String anchorName) { > Element element = DOM.createAnchor(); > setElement(element); > DOM.setElementAttribute(element, "name", anchorName == > null ? "" : anchorName); > DOM.setInnerText(element, text == null ? "" : text); > } > > } > > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
