Jon JC Posted July 3, 2006 Share Posted July 3, 2006 Hi,I want to include an external text (or .js/.html) file into a specific section of an HTML page. This is what I have right now:<script type="text/javascript">function changeText(){var cell=document.getElementById('textLocation').rows[0].cellscell[0].innerHTML="<script src=\"ExternalText.js\"></script>"}</script>This obviously does not work. I think it is because the <srcipt> tag does not support nested <script> tags. Any ideas?JC Link to comment Share on other sites More sharing options...
Chocolate570 Posted July 3, 2006 Share Posted July 3, 2006 You can't do this with just plain javascript. You would need AJAX or server side scripting code (SSI, or server side includes) Check out the AJAX section of the W3Schools page. Link to comment Share on other sites More sharing options...
Jon JC Posted July 3, 2006 Author Share Posted July 3, 2006 Got it to work.Thanks Chocolate.JC Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now