An html page that displays data from other html pages

Hi all.

I am trying to brainstorm the following:


Part One of my question:
I have a manual with various policies. Each policy has two options: Internal and External.

I would like to have a policy have one html page, so if I have 3 policies there will be 3 html pages. Is there a way to have one html page display all the policies which are in different html pages.

For example:

Policy 1: No running (Internal) --> Html Page 1

Policy 2: No screaming (Internal) --> Html Page 2

Policy 3: No sleeping (External) --> Html Page 3

So let's say I want to have an option to see all of the html pages into one, so that i can make one single print out, instead of 3.

Policy 1: No running (Internal)
Policy 2: No screaming (Internal and External)
Policy 3: No sleeping (External)

Part Two of my question:

As you can see some policies will be internal, external or both. I would like to have one html to show all internal policies, and a separate to include all external policies. How can I accomplish this? Are smart tags the answer or to keep all this data in a database?

I plan to store these html pages in Sharepoint will this be a problem, if it is then i'd just save each html page in the webpage folder. Thanks in advance!
printmediaAsked:
Who is Participating?
 
PreeceCommented:
Here is another example without the use of tr id's:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function ShowAll()  {
  var elements=document.getElementsByTagName("tr");
       for(var i = 0; i < elements.length; i++) {
        elements.item(i).style.display = "";
      }
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//function HideRow(tr)  {
//  //alert("yep");
//  var row=document.getElementById(tr);
//      row.style.display = "none";
//
//}
//-->
</script>

</head>
<body>
  <input type=button value='show all' onclick="javascript: ShowAll();">

  <table border=1 cellspacing=0 cellpadding=2>
    <tr>
      <td>&nbsp;</td>
      <td>Policy #</td>
      <td>Name</td>
      <td>Type</td>
      <td>Description</td>
    </tr>      
    <tr>
      <td><input type=checkbox onclick="javascript: this.parentNode.parentNode.style.display='none';"></td>
      <td>0001</td>
      <td>No Running</td>
      <td>Internal</td>
      <td>Abslolutely no running is permitted without shoes on.</td>
    </tr>      
    <tr>
      <td><input type=checkbox onclick="javascript: this.parentNode.parentNode.style.display='none';"></td>
      <td>0002</td>
      <td>Internal</td>
      <td>No screaming</td>
      <td>Screaming is not permitted unless everyone in the room has been issued earplugs.</td>
    </tr>      
    <tr>
      <td><input type=checkbox onclick="javascript: this.parentNode.parentNode.style.display='none';"></td>
      <td>0003</td>
      <td>External</td>
      <td>No sleeping</td>
      <td>Sleeping is not allowed unless you have a warm enough blanket and a pillow.</td>
      <td></td>
    </tr>      
  </table>
</body>
</html>


Preece
0
 
PreeceCommented:
You could simply have all policies on one page, and show/hide policies as needed.

Preece
0
 
PreeceCommented:
I just put this together and it may server as a starting point if the idea is practical in your situation:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function ShowAll()  {
  var elements=document.getElementsByTagName("tr");
       for(var i = 0; i < elements.length; i++) {
        elements.item(i).style.display = "";
      }
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function HideRow(tr)  {
  //alert("yep");
  var row=document.getElementById(tr);
      row.style.display = "none";

}
//-->
</script>

</head>
<body>
  <input type=button value='show all' onclick="javascript: ShowAll();">

  <table border=1 cellspacing=0 cellpadding=2>
    <tr>
      <td>&nbsp;</td>
      <td>Policy #</td>
      <td>Name</td>
      <td>Type</td>
      <td>Description</td>
    </tr>      
    <tr id="tr_1">
      <td><input type=checkbox onclick="javascript: HideRow('tr_1');"></td>
      <td>0001</td>
      <td>No Running</td>
      <td>Internal</td>
      <td>Abslolutely no running is permitted without shoes on.</td>
    </tr>      
    <tr id="tr_2">
      <td><input type=checkbox onclick="javascript: HideRow('tr_2');"></td>
      <td>0002</td>
      <td>Internal</td>
      <td>No screaming</td>
      <td>Screaming is not permitted unless everyone in the room has been issued earplugs.</td>
    </tr>      
    <tr id="tr_3">
      <td><input type=checkbox onclick="javascript: HideRow('tr_3');"></td>
      <td>0003</td>
      <td>External</td>
      <td>No sleeping</td>
      <td>Sleeping is not allowed unless you have a warm enough blanket and a pillow.</td>
      <td></td>
    </tr>      
  </table>
</body>
</html>


Preece
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
printmediaAuthor Commented:
Please excuse the question but what are tr ids?
0
 
ThinkPaperIT ConsultantCommented:
tr ids = table row IDs.
In Preece's example they're: <tr id="tr_3">

With table row IDs you can define ids for each row and do a multitude of stuff with it (hide/show/formatting) You can make one row blue and another green if you wanted to.
0
 
printmediaAuthor Commented:
What if I have policies on different html pages because they reside on different areas of the intranet site, and I just want to have one html page that brings all of these policies on different html pages into one major html page. Is that possible?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.