Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLAnchorElement.appendChild()


        HTMLAnchorElement link = createLink();
        Node parentNode = node.getParentNode();
        parentNode.replaceChild(link, node);
        if (node instanceof HTMLImageElement)
            ((HTMLImageElement)node).setBorder("0");
        link.appendChild(node);
    }

    protected void replaceElemWithAnother(Element elem,Element newElem)
    {
        Node parent = elem.getParentNode();
View Full Code Here


                if (node instanceof HTMLImageElement)
                    ((HTMLImageElement)node).setBorder("0");
            }
        }
        HTMLAnchorElement link = createLink();
        link.appendChild(content);
        elem.appendChild(link);
    }

    public HTMLAnchorElement createLink()
    {
View Full Code Here

                if (node instanceof HTMLImageElement)
                    ((HTMLImageElement)node).setBorder("0");
            }
        }
        HTMLAnchorElement link = createLink();
        link.appendChild(content);
        elem.appendChild(link);
    }

    protected HTMLAnchorElement createLink()
    {
View Full Code Here

   */
  public void setLinkAt( int index, String linkText, String url )
  {
    HTMLAnchorElement anchor = (HTMLAnchorElement)htmlDoc.createElement( "A" );
    Node text = htmlDoc.getBody().getFirstChild().cloneNode( true );
    anchor.appendChild( text );
    anchor.setHref( url );
    Node location = tabs.tableElement.getLastChild().getFirstChild().getChildNodes().item( 2 * index - 1 );
    location.appendChild( anchor );
    location.appendChild( text.cloneNode( true ) );
    location.getChildNodes().item( 1 ).getFirstChild().setNodeValue( linkText );
View Full Code Here

      this.insertCell( row, column );
    }
    Node location = tableElement.getLastChild().getChildNodes().item( 2 * ( row - 1 ) ).getChildNodes().item( 2 * column - 1 );
    HTMLAnchorElement anchor = (HTMLAnchorElement)htmlDoc.createElement( "A" );
    Node text = htmlDoc.getBody().getFirstChild().cloneNode( true );
    anchor.appendChild( text );
    anchor.getFirstChild().setNodeValue( name );
    anchor.setHref( url );
    location.insertBefore( anchor, location.getFirstChild() );
    location.insertBefore( text.cloneNode( true ), anchor );
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.