home *** CD-ROM | disk | FTP | other *** search
/ Chip Hitware 7 A / CHIP_HITWARE_7A.iso / internet / Webmaster / _SETUP.4 / Group3 / ptab.jav < prev    next >
Text File  |  1998-12-30  |  6KB  |  172 lines

  1. <!---BeginTitle--->POPUP Tables in your web page<!---BeginJAVHead---><!---BeginJAVBody---><script language="javascript">
  2. //
  3.     Titles=[ "General Programming",
  4.              "Testing",
  5.              "Windows",
  6.              "Assembly",
  7.              "Data Base",
  8.              "Statistical",
  9.              "Graphical",
  10.              "Text",
  11.              "Spreadsheet",
  12.              "Command"];
  13.   
  14.     var nCols = 4;              // Number of columns in the tables
  15.     var bgColor = "Yellow";     // Pop-up table background color
  16.     var fgColor = "Black";      // Pop-up table text color
  17.     Text = new Array(10);       // Array of arrays of pop-up table data
  18. //
  19. //       Language     Years Last Used   Bold
  20. //       -----------  ----- ---------   ----
  21.     Text[0] = new Array(
  22.          "C",         13, "Current", 1,
  23.          "C++",        5, "Current", 1,
  24.          "FORTRAN",   30, 1986,      1,
  25.          "BASIC",     20, 1987,      1,
  26.          "PROLOG",     1, 1990,      0,
  27.          "ADA",      1/2, 1985,      0,
  28.          "LISP",       2, 1975,      0,
  29.          "PL/1",       1, 1978,      0,
  30.          "APL",        2, 1971,      0,
  31.          "COBOL",    1/4, 1967,      0);
  32.     Text[1] = new Array(
  33.          "QA Partner (4Test)", 6, "Current", 1,
  34.          "DTM",                3, 1986,      0,
  35.          "WinRunner",        1/4, 1997,      0);
  36.     Text[2] = new Array(
  37.          "C++",          5, "Current", 1,
  38.          "C++ Builder",  2, "Current", 1,
  39.          "Java",       1/2, "Current", 0,
  40.          "JavaScript",0.08,"Current",  0,
  41.          "Delphi",     1/4, 1997,      0,
  42.          "Visual Basic", 1, "Current", 0,
  43.          "SAS/AF",       2, 1991,      0);
  44.     Text[3] = new Array(
  45.          "MASM",      1, 1985,    0,
  46.          "GMAP",      1, 1986,    0,
  47.          "BAL",       1, 1971,    0);
  48.     Text[4] = new Array(
  49.          "SQL*Plus", 12, "Current", 1,
  50.          "SAS/SQL",   1, 1991,      0,
  51.          "Access",    1, "Current", 1,
  52.          "SIR",       3, 1979,      0,
  53.          "dBase",     3, 1985,      0,
  54.          "Rbase",     4, 1987,      0);
  55.     Text[5] = new Array(
  56.          "SAS",      8, 1990,    1,
  57.          "SPSS",     2, 1971,    0,
  58.          "Minitab",  3, 1980,    0,
  59.          "SIR",      1, 1979,    0,
  60.          "P-STAT",   2, 1985,    0,
  61.          "GLIM",     1, 1985,    0);
  62.     Text[6] = new Array(
  63.          "Corel",     1/2, 1997,     0,
  64.          "Tel-A-Graph", 1, 1986,     0,
  65.          "SAS/GRAPH",   8, 1990,     0);
  66.     Text[7] = new Array(
  67.          "Word",        10, "Current", 1,
  68.          "WordPerfect", 15, 1988,      1,
  69.          "TPU",          8, 1987,      0,
  70.          "EEL",          5, 1971,      0,
  71.          "SNOBOL",       5, 1971,      1,
  72.          "Postscript",   1, 1995,      0);
  73.     Text[8] = new Array(
  74.          "Excel",       2, "Current", 1,
  75.          "Lotus 1-2-3", 5, 1986,      0);
  76.     Text[9] =  new Array(
  77.          "MS-DOS",   18, "Current", 1,
  78.          "NDOS",     15, "Current", 1,
  79.          "DCL",      10, 1992,      1,
  80.          "JCL",      10, 1971,      0,
  81.          "UNIX",      5, 1980,      0);
  82. function eShow(name)
  83. {
  84.     document.all(name).style.display = "inline";
  85. }
  86. function eHide(name)
  87. {
  88.     document.all(name).style.display = "none";
  89. }
  90. </script>
  91. </head>
  92. <body>
  93. <p><b>Pop-up table sample</b></p>
  94.   
  95. <p>This is an extract from my resume. To see the pop-up tables, move
  96. your mouse pointer over the text in any line below.</p>
  97.   
  98. <div style="position:relative">
  99. <script language="javascript">
  100.     for (var j = 0; j < Titles.length; ++j)
  101.     {
  102.         name = Titles[j];
  103.         document.writeln(
  104.         "<div style=\"position:absolute;top:5px;width:350px\">\n" +
  105.         "    <table id=\"" + name + "\"" +
  106.         " cellpadding=1 cellspacing=4 border=2" +
  107.         " bgColor=" + bgColor+ "\n style=" +
  108.         "\"display:none; position:absolute; left:200px\">");
  109.         document.writeln(
  110.             "<tr bgColor=" + bgColor+ ">");
  111.         document.writeln(
  112.             "  <th bgColor=" + fgColor + " align=center>" +
  113.             " <font color=" + bgColor + ">Language</font>");
  114.         document.writeln(
  115.             "  <th bgColor=" + fgColor + " align=center>" +
  116.             " <font color=" + bgColor + ">Years Used</font>");
  117.         document.writeln
  118.             ("  <th bgColor=" + fgColor + " align=center>" +
  119.              " <font color=" + bgColor + ">Last Used</font>");
  120.         for (var i = 0; i < Text[j].length; i = i + nCols)
  121.         {
  122.             if (Text[j][i + 3] == 0)
  123.             {
  124.                 document.writeln(
  125.                 "  <tr><td>" + Text[j][i] + 
  126.                 "\n    <td align=\"center\">" + Text[j][i+1] + 
  127.                 "\n    <td>" + Text[j][i+2] + "\n  </tr>");
  128.             }
  129.             else
  130.             {
  131.                 document.writeln(
  132.                 "  <tr><td><b>" + Text[j][i] + 
  133.                 "</b>\n    <td align=\"center\"><b>" + Text[j][i+1] + 
  134.                 "</b>\n    <td><b>" + Text[j][i+2] + "</b>\n  </tr>");
  135.             }
  136.         }
  137.         document.writeln("</table>");
  138.         document.writeln("</div>");
  139.     }
  140. </script>
  141. </div>
  142.   
  143. <table border="0" cellspacing="4">
  144. <script language="javascript">
  145.   for (var i = 0; i < Titles.length; ++i)
  146.   {
  147.     document.writeln("<tr>\n<td><p align=\"right\"><a");
  148.     document.writeln("onmouseover=\"eShow("" + Titles[i] + "")\"");
  149.     document.writeln("onmouseout=\"eHide("" + Titles[i] + "")\"</a>" + Titles[i] + ":</p>");
  150.     document.writeln("</td>\n<td><a onmouseover=\"eShow("" + Titles[i] + "")\"");
  151.     document.writeln("onmouseout=\"eHide("" + Titles[i] + "")\"</a>");
  152.     document.writeln("<font color=\"#0000FF\" size=\"3\" face=\"Arial\">");
  153.     for (var j = 0; j < Text[i].length; j = j + nCols)
  154.     {
  155.       if (j > 0)
  156.       {
  157.         document.write(", ");
  158.       }
  159.       if (Text[i][j + 3] == 1)
  160.       {
  161.         document.write("<b>" + Text[i][j] + "</b>");
  162.       }
  163.       else
  164.       {
  165.         document.write(Text[i][j]);
  166.       }
  167.     }
  168.     document.writeln("\n</font></a></td></tr>")
  169.   }
  170. </script>
  171. </table><!--EndJAVBody-->
  172.