[Javascript] Any creative way to pull html content same way js files are pulled

DEV dev at qroute.net
Mon Mar 31 06:34:17 CST 2003


Des anypone of you know how I can implement a  server side include file
flexibility on the client side ? What I mean by that is this;

<Script src='File.js'></script>  does absolutely the exact thing I have in
mind except that the requested content  must be in a JS format. As a result
of this condition,  if you happened to have a content in html to display (
which is the most of the case ) ,  you have to transform it so it does the
job using document.write commands.

Of course one alternative to my pure html pull wish is to tap into iframe's.

For example , following will do the trick..

<script>
var sFile='/mycontent.HTM'
</script>



some html

<script>document.write "(<iframe src='" + sFile + "'></script>

But this will cause the scroll bars to come on in the midlle of the page in
the case that the sFile content is lengthy. That's the price you pay for
that includability.
In a server side include however, you never run into this scroll-bar
situation.

Does dhrml or some other technology other than iframe's help me in any  way
?

Thanks



More information about the Javascript mailing list