"McKirahan" <News@McKirahan.com> wrote in message
news:xaWdnb4YwsogIg3fRVn-sw@comcast.com...[color=blue]
> "Hywel Jenkins" <hywel.jenkins@gmail.com> wrote in message
> news:MPG.1cfacc83b3880049896dc@news.eclipse.net.uk ...[color=green]
> > In article <d6q4il$2a2g$1@news10.jaring.my>,
superbaby@myjaring.net
> > says...[color=darkred]
> > > I would like to call the content of content.htm (containing only HTML
> > > codes) into index.htm.
> > >
> > > This is usually done by renaming index.htm to index.shtml and use this[/color][/color]
> tag:[color=green][color=darkred]
> > >
> > > <!--#include file="content.htm" -->
> > >
> > > But I do not want to use SSI. Is it possible to call it using[/color][/color][/color]
something[color=blue][color=green][color=darkred]
> > > like:
> > >
> > > <script src="content.js"></script>
> > >
> > > If yes, how should content.js look like?[/color]
> >
> > Full of document.write() function calls I would guess.
> >
> > --
> > Hywel
> >
> > Kill the Crazy Frog
> >
http://www.petitiononline.com/crzyfrg/[/color]
>
> Or build an array and "document.write" the join; as in:
>
> var i = 0;
> var a = new Array();
> a(i++) = "<table border='1'>";
> a(i++) = "<tr>";
> a(i++) = " <td>Hello World!</td>";
> a(i++) = "</tr>";
> a(i++) = "</table>";
> document.write a.join("\n");
>
>[/color]
Try this instead:
var html = [
"<table border='1'>",
"<tr>",
" <td>Hello World!</td>",
"</tr>",
"</table>",
""];
document.write(html.join(""));