home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Eclipse SDK / eclipse-SDK-3.1.1-win32.exe / eclipse / plugins / org.eclipse.help.webapp_3.1.0 / advanced / tocFragment.jsp < prev    next >
Encoding:
Text File  |  2005-09-29  |  1.6 KB  |  55 lines

  1. <%--
  2.  Copyright (c) 2000, 2004 IBM Corporation and others.
  3.  All rights reserved. This program and the accompanying materials 
  4.  are made available under the terms of the Eclipse Public License v1.0
  5.  which accompanies this distribution, and is available at
  6.  http://www.eclipse.org/legal/epl-v10.html
  7.  
  8.  Contributors:
  9.      IBM Corporation - initial API and implementation
  10. --%>
  11. <%@ include file="header.jsp"%>
  12. <% 
  13.     TocData data = new TocData(application,request, response);
  14.     WebappPreferences prefs = data.getPrefs();
  15. %>
  16. <html>
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  19. <title><%=ServletResources.getString("partialContent", request)%></title>
  20. <script language="JavaScript">
  21. plus = new Image();
  22. plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
  23. folder_img = new Image();
  24. folder_img.src = "<%=prefs.getImagesDirectory()%>"+"/container_obj.gif";
  25. topic_img = new Image();
  26. topic_img.src = "<%=prefs.getImagesDirectory()%>"+"/topic.gif";
  27.  
  28. function onloadHandler()
  29. {
  30.     var fragment = null;
  31.     for (var i=0; i < document.body.childNodes.length; i++)
  32.         if (document.body.childNodes[i].nodeName == "UL"){
  33.             fragment = document.body.childNodes[i];
  34.             break;
  35.         }
  36.     if(fragment == null) return;
  37.     var path = fragment.id;
  38.     var oldFragment = window.parent.document.getElementById(path);
  39.     oldFragment.innerHTML = fragment.innerHTML;
  40.     oldFragment.id = "";
  41. }
  42. </script>
  43. </head>
  44. <body dir="<%=direction%>" onload="onloadHandler()">
  45. <%
  46.         int toc=data.getSelectedToc();
  47.         // Only generate the selected toc
  48.         if (toc != -1 && data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc)))
  49.         {
  50.             data.generateToc(toc, out);
  51.         }
  52. %>
  53. </body>
  54. </html>
  55.