demose01
11-06-2003, 09:39 AM
Thanks in advance first thing.
I'm trying to write a simple chatroom application for my website. I've looked around at some of the free ones on the net and I haven't been satisfied.
What I've written so far works fine and by using remote execution, I can detect when a new post is made to the chatroom(thus cutting down how many refreshes I have to make). The problem is that I don't want to have to refresh it at all. So I used a remote execution function to return the contents of the chatroom back to be displayed, but when I change the innerHTML of the <p id=textToChange></p>, I end up getting all the HTML code as text.
My question is, can I use the innerHTML to change the contents of textToChange but have the browser recompile the HTML code without having to refresh? Or, is there a better way all together to do this? The end result I want is that the contents of the chatroom are altered, allowing for html code, without having to refresh the page.
I'm trying to write a simple chatroom application for my website. I've looked around at some of the free ones on the net and I haven't been satisfied.
What I've written so far works fine and by using remote execution, I can detect when a new post is made to the chatroom(thus cutting down how many refreshes I have to make). The problem is that I don't want to have to refresh it at all. So I used a remote execution function to return the contents of the chatroom back to be displayed, but when I change the innerHTML of the <p id=textToChange></p>, I end up getting all the HTML code as text.
My question is, can I use the innerHTML to change the contents of textToChange but have the browser recompile the HTML code without having to refresh? Or, is there a better way all together to do this? The end result I want is that the contents of the chatroom are altered, allowing for html code, without having to refresh the page.