whiskey
08-17-2003, 08:27 PM
I have a javascript script that displays a two-column table representing the layout for everyone of my pages. The first column has the menu which is the same for every page. But the second column has the page content which is different for each page.
Inside the script, I read off the contents of a tag containing a certain id (using innerHTML method) and dump that inside the second column. This is the page's main content.
However, I don't want the HTML tag to be parsed twice since this can lead to some functionality problems.
Is there a nice way of preventing the tag's contents to be html parsed?
I used this hack and it seems to do the trick:
<script type=text id=content>
html goes here
</script>
But I'm worrying that it might break on other browsers.
Inside the script, I read off the contents of a tag containing a certain id (using innerHTML method) and dump that inside the second column. This is the page's main content.
However, I don't want the HTML tag to be parsed twice since this can lead to some functionality problems.
Is there a nice way of preventing the tag's contents to be html parsed?
I used this hack and it seems to do the trick:
<script type=text id=content>
html goes here
</script>
But I'm worrying that it might break on other browsers.