• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Html tag

 
siraj siddiqui
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,
I want to know , Can we add an html tag from applet to the html file in which applete is
is running ? If yes , then how ?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If by "html tag" you mean the actual <HTML> tag, then no - the page already has one, and it can't have more than one. If you mean any HTML tag, then you should check out the Common DOM API, which allows applets to access and manipulate the page's DOM.
 
siraj siddiqui
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In jdk following class is there

public static class HTMLEditorKit.InsertHTMLTextAction
extends HTMLEditorKit.HTMLTextAction

it says

InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document. At least two HTML.Tags need to be supplied. The first Tag, parentTag, identifies the parent in the document to add the elements to. The second tag, addTag, identifies the first tag that should be added to the document as seen in the HTML string. One important thing to remember, is that the parser is going to generate all the appropriate tags, even if they aren't in the HTML string passed in.

For example, lets say you wanted to create an action to insert a table into the body. The parentTag would be HTML.Tag.BODY, addTag would be HTML.Tag.TABLE, and the string could be something like
.

There is also an option to supply an alternate parentTag and addTag. These will be checked for if there is no parentTag at offset.

I do not understand this , will you explain ?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This class is not used for accessing the surrounding web page in an applet. Given that, is it still what you want to ask, even if it has nothing to do with applets?
 
siraj siddiqui
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you provide any sample code or tutorial for this class HTMLEditorKit.InsertHTMLTextAction ?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, that class would not be used for what you describe. If you told us what you're really trying to do we could better help you.
 
Gauri Patil
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously not, You canot add APPLET to HTML file,because platfrom for APPLET is JAVA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic