sazzie Posted January 5, 2007 Share Posted January 5, 2007 I have a project I'm working on - an ajax project.In my javascript call back function I have the following line : [color=green]var newTextElement = document.createTextNode(text);document.getElementById("div2").appendChild(newTextElement);[/color]'text' actually contains html code so I want a webpage displayed but it just pours out my code.Can anyone advice me on how to get the text to be recognised as html code and display my webpage. ;) Quote Link to comment Share on other sites More sharing options...
fenway Posted January 6, 2007 Share Posted January 6, 2007 "Pours out"? Quote Link to comment Share on other sites More sharing options...
irken Posted January 7, 2007 Share Posted January 7, 2007 Hehe, I think he means like, the pre tag. Showing the HTML code rather than evaluating it.Hmm.. can you post some code of what you got? Quote Link to comment Share on other sites More sharing options...
fenway Posted January 7, 2007 Share Posted January 7, 2007 Well, you asked for a text node, so you're getting raw text. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.