philliptune
11-17-2005, 02:29 PM
So I'm trying to streamline development of a long list of pages by using JavaScript and variables. I'm just learning this stuff as I go along and I remembered seeing something called document.write() to write out html where the script is put. But as I'm writing the lines of the page, my other <script>s that I'm trying to write in are exiting my "big" script.
<script name="big">
document.write('<html>')
document.write(' <head>')
document.write(' <script src="../scripts/little.js" language="javascript" type="text/javascript"></script>')
</script>
See, the </script> on my "little" script is exiting my "big" script. How do I keep it from doing that?
Also, is there going to be any cross-browser compatability problems by using JavaScript or this "document.write" script?
<script name="big">
document.write('<html>')
document.write(' <head>')
document.write(' <script src="../scripts/little.js" language="javascript" type="text/javascript"></script>')
</script>
See, the </script> on my "little" script is exiting my "big" script. How do I keep it from doing that?
Also, is there going to be any cross-browser compatability problems by using JavaScript or this "document.write" script?