?
Solved

An html page that displays data from other html pages

Posted on 2006-04-20
6
Medium Priority
?
175 Views
Last Modified: 2013-12-16
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!
0
Comment
Question by:printmedia
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:Preece
ID: 16502796
You could simply have all policies on one page, and show/hide policies as needed.

Preece
0
 
LVL 12

Expert Comment

by:Preece
ID: 16502968
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
 
LVL 12

Accepted Solution

by:
Preece earned 2000 total points
ID: 16503173
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:printmedia
ID: 16535273
Please excuse the question but what are tr ids?
0
 
LVL 16

Expert Comment

by:ThinkPaper
ID: 16537225
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
 

Author Comment

by:printmedia
ID: 16544538
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question