Embed the Java Applet in Your SharePoint Site
To embed the Java Applet in your SharePoint site, edit the page that contains the applet and add a new Script Editor Web Part next to an existing Documents web part.
Note
It is
recommended that you deselect the Enable Java content in the browser option from the
Java Control Panel until you finish editing the page. Otherwise, the browser will
load the applet for every change that you will make.
Edit the page directly in your browser, following these steps:
- Go to the home page of your SharePoint site where you want to add the Author Component Java applet.
- Select the Page tab from the ribbon located at top of the page and click the Edit button.
- Select the Insert tab and click Web Part.
- In the Categories panel, select Media and Content.
- In the Parts panel, select the Script Editor Web Part.
- Click the Add button to insert the selected Web Part to your page content.
- Select the newly added Web Part.
- Select the Web Part tab and click the Web Part Properties button.
- Click the Edit Snippet link under your Web Part.
- Insert the following HTML snippet to your newly created Web Part:
<div> <iframe id="appletIFrame" src="/applet/SitePages/author-component/author-component-dita.aspx" width="800px" height="850px"> </iframe> <script type="text/JavaScript"> function openInAuthor(itemUrl) { var appletFrame = document.getElementById("appletIFrame"); var appletWin = appletFrame.contentWindow; appletWin.openListItemInAuthor(itemUrl); } </script> </div>
The above HTML fragment contains anIFrame
that points to the page where the Java applet resides. Replace the value of thesrc
attribute with the path of theauthor-component-dita.aspx
HTML page that you added earlier to theSitePages
folder;Note
Use theiframe
element from the HTML fragment with the expanded form (<iframe></iframe>
). Otherwise, the Web Part will not display the target page of the frame. - Save the changes you made to the page.
Note
Do not forget to select the Enable Java content in the browser, to allow the browser to load the Java applet.