<div> source?

windows

Guest
Can you give a <div> a source the way you can with iframes? Here's an example:<br />
<br />
<iframe name="cwindow" style="border:0px ridge gray" scrolling="auto" width=500 height=300 src=http://www.webdeveloper.com/forum/archive/index.php/"blog.html"></iframe><br />
<br />
<div style="border : solid 0px #737373; background : #737373; color : #000000; padding : 4px; width : 500px; height : 300px; overflow : auto; " ></div><br />
<br />
In the <div> tag, is it possible to show the other html file like you can in the iframe tag? I want to be able to just edit that separate file without having to edit my main page. When I edit that separate file, it will show up in a box on the main page.<br />
<br />
Thanks in advance.<!--content-->Server-side is what you need. Refer to this thread (<!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/showthread.php?s=&threadid=32476">http://www.webdeveloper.com/forum/showt ... adid=32476</a><!-- m -->) for further details.<!--content-->I'm sorry for being ignorant, but where exactly do I put this code?<br />
<br />
<!--#include virtual="foo.txt"--><br />
<br />
Does it go inside the <div> tag on the main page?<!--content-->That's correct. Essentially, wherever you want that file to be included.<!--content-->Just to make sure I understand (which I'm not sure if I do :o ), is this what the tag will end up looking like?<br />
<br />
<div style="border : solid 0px #737373; background : #737373; color : #000000; padding : 4px; width : 500px; height : 300px; overflow : auto; " <!--#include virtual="foo.txt"--> ></div><br />
<br />
Somehow, that doesn't seem right. I'm sure I'm doing something wrong.<!--content-->What you want to be doing is:<div style="border : solid 0px #737373; background : #737373; color : #000000; padding : 4px; width : 500px; height : 300px; overflow : auto; "><br />
<!--#include virtual="foo.txt"--> <br />
</div>This would result in the contents of foo.txt within that element (therefore included on the page), effectively emulating the functionality of an iframe but in a much more accessible manner.<!--content-->Somebody correct me if I'm wrong (I know you will), but if you use the SSI, don't you have to save your file as .shtml, rather than .htm or .html?<!--content-->Originally posted by Aronya1 <br />
Somebody correct me if I'm wrong (I know you will), but if you use the SSI, don't you have to save your file as .shtml, rather than .htm or .html? <br />
<br />
In this case, the file which has the <div> tag would be saved with a .shtml extension.<!--content-->
 
Back
Top