HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 24th, 2000, 10:04 AM
yashika yashika is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 1999
Location: iselin
Posts: 1 yashika User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I want to create an include file which i want to call from various html files..i tried doing this but it does not work at all.pls suggest how do i go about it..
Thanks
Yashika

Include.html:- This is the file i want to call from various files:

<table width=100%>
<tr><font color="red">
Chat with fellow fans while watching Jimmy and Lucas share their opinions about the Royal Rumble on Gettin' RAW.
If you haven't registered, please register now. To maximize this experience, make sure you have the correct media player.</font>
</tr></table>

main.html: from this file the include file is been called:
<html>
<head>
<title>main</title>
</head>

<body>
<!-- #INCLUDE file = "include.html" -->
</body>
</html>




------------------

Reply With Quote
  #2  
Old January 24th, 2000, 01:59 PM
Vernon Frazee Vernon Frazee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Posts: 25 Vernon Frazee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
--- begin main.htm --- (cut here) ---
<html>
&nbsp;<head>
&nbsp; <title>Example</title>
&nbsp;</head>
&nbsp;<body>
&nbsp; <center>
&nbsp; &nbsp;Hello from HTML<br>
&nbsp; &nbsp;<script language="javascript" src="include.js"></script>
&nbsp; &nbsp;<noscript>(javascript required)</noscript>
&nbsp; </center>
&nbsp;</body>
</html>
--- end main.htm --- (cut here) ---

--- begin include.js --- (cut here) ---
document.write(
'Hello from Javascript'
);
--- end include.js --- (cut here) ---

Reply With Quote
  #3  
Old January 24th, 2000, 02:46 PM
melz melz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Posts: 11 melz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well, does your server parse SSI commands for .html files? For security reasons, most servers require your page to be named as main.shtml instead of main.html in order to execute SSI commands.


If it still doesn't work, try using all lowercaps ... I'm not too sure if the command is case-sensitve

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
<!--#include file="include.html" -->
[/code]

Reply With Quote
  #4  
Old February 8th, 2000, 06:40 AM
Noldus Noldus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Utrecht, Netherlands
Posts: 2 Noldus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Noldus
while we're on the subject of include files...

i'm pretty new at this, and i'm trying to create a template that can display all html or asp content.
like this:
(template.xxx)
...<body>...
<?php readfile($file); ?>
...</body>

it's called like this: template.xxx?file=...

only, instead of php3 it must be asp code, or
html.

does anyone know how to do this?
please mail me a copy of your answer at nout@p4p.nl.

thanks.

Reply With Quote
  #5  
Old November 14th, 2000, 02:01 AM
Fahad Fahad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 2 Fahad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Vernon,

The example you posted works only for script code. It does not work for HTML code like displaying a table or an image. Any other ideas?


<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Vernon Frazee:
--- begin main.htm --- (cut here) ---
<html>
*<head>
* <title>Example</title>
*</head>
*<body>
* <center>
* *Hello from HTML<br>
* *<script language="javascript" src="include.js"></script>
* *<noscript>(javascript required)</noscript>
* </center>
*</body>
</html>
--- end main.htm --- (cut here) ---

--- begin include.js --- (cut here) ---
document.write(
'Hello from Javascript'
);
--- end include.js --- (cut here) ---
[/quote]


Reply With Quote
  #6  
Old November 14th, 2000, 03:46 AM
stardotstar stardotstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 63 stardotstar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
actually the js file should work if you have something like this in it (addme.js):<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
document.write('<table width=100%>');
document.write('<tr><td><font color=red>');
document.write('Chat with fellow fans...');
document.write('</font></td></tr></table>');
[/code]
And in your main.html:<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
<html>
<head>
<title>main</title>
</head>

<body>
<script language="JavaScript" src="addme.js"></script>
</body>
</html>
[/code]

Hope that helped.


[This message has been edited by stardotstar (edited November 14, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > include file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway