PDA

View Full Version : include tag


dw5304
12-10-2004, 11:36 PM
I know that the include tage is <!--#include file="some_file.html"--> but when trying to use it the file never appers
here is what i have for code;
<html>
<body>
<!--#include file="charheighttable.html"-->
</body>
</html>

and this if charheighttable.html



<CENTER><table border="1" BGCOLOR="#FFFCC">
<td><center>Grade</td>
<td><center> Seat Height<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;14"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;16"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;18"&nbsp;&nbsp;&nbsp;</td>
</tr>
<CENTER><taBle border="1" BGCOLOR ="#FFFCC">
<td><center> presch.- K.</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>
<td><center> 1</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>
<td><center> 2</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>
<td><center> 3</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>
<td><center> 4</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>
<td><center> 5</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>
<td><center> 6</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933CC">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>
<td><center> 7-12</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "WHITE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td BGCOLOR= "#9933CC">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TR>

any help will be helpfull!

Jalenack
12-11-2004, 01:29 AM
you can do it with some simple javascript, but i recommend doing it in PHP or something like that...this isn't a great solution because its hard to edit and not incredibly accessibility...also make sure you standardize and stuff if you..hopes this helps

Your mainpage.html

<html>

<head>
<style type='text/css'>
td, th {text-align: center; width: 80px; background: #FFC; border: 1px black solid;}
.purple { background: #93C;}
table {background: #FFC;}
</style>
</head>

<body>
<script type="text/javascript" src="charheighttable.js"></script>
</body>
</html>


I fixed up your table code to be smaller (save as charheighttable.js)

document.write ("<table><tr><td colspan='5'>Seat Height</td></tr><tr><th>Grade</th><th>12'</th><th>14'</th><th>16'</th><th>18'</th>")
document.write ("</tr><tr><td>presch.- K.</td><td class='purple'></td>")
document.write ("<td class='purple'></td><td>&nbsp;</td><td>&nbsp;</td></tr>")
document.write ("<td>1</td><td>&nbsp;</td><td class='purple'></td><td>&nbsp;</td><td>&nbsp;</td></tr>")
document.write ("<td>2</td><td>&nbsp;</td><td class='purple'></td><td class='purple'></td><td>&nbsp;</td>")
document.write ("</tr><td>3</td><td>&nbsp;</td><td>&nbsp;</td><td class='purple'></td><td>&nbsp;</td></tr>")
document.write ("<td>4</td><td>&nbsp;</td><td>&nbsp;</td><td class='purple'></td><td class='purple'></td></tr>")
document.write ("<td>5</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td class='purple'></td></tr>")
document.write ("<td 6</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td class='purple'></td>")
document.write ("</tr><td> 7-12</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td class='purple'></td></tr></table>")

hemebond
12-11-2004, 01:35 AM
I know that the include tage is <!--#include file="some_file.html"--> but when trying to use it the file never appersYou do have Apache running yeah?

gsnedders
12-11-2004, 12:41 PM
Even that can be disabled by the webhost, read this for more information (http://www.javascriptkit.com/howto/htaccess4.shtml)

dw5304
12-13-2004, 09:30 PM
hey thanks for responding. we here do not have php loaded on are server here and we do not have Apache. were using a program that only allows so manyline and there is not enough there. We cant cange the program b/c then we will have to reenter 10,000 products. which is about 98% done.

thanks any ways ill will try another way.

rmedek
12-13-2004, 09:37 PM
I know this is probably a dumb question, but did you save the files calling the include as ".shtml"?

Puffin the Erb
12-13-2004, 09:39 PM
You could use PHP to include code.

<?php

include("filetoinclude.php");

?>

dw5304
12-14-2004, 12:00 AM
I got around this problem. I just created a new img files and set it up from there. Thanks a lot for all the feedback. I appreciate it. Thanks again,

Dw5304