CCH
12-31-2009, 11:38 PM
I understand that it's possible to add events like onReadyStateChange to a iFrame to determine if a new page was loaded into the iframe (such as the viewer clicking a link inside the iframe to load a new page), but what if the page is changed via AJAX? Is there any way to read information about the iframe to determine if the page has been changed in some way?
In my situation, I'm trying to create a script that will watch an automatically updating page that uses AJAX, and display an alert when the content of the page changes. The exact use is with a chat box called CBox. They use AJAX to display new posts in the chat. I use their chat box on my website, but I don't always have it displayed on the page. The user can click a button to display the chat box as an overlay on the page. My goal is to create a script that will watch the chat box while it is not being displayed and call a function whenever the content of the chat box changes, such as if another person posts in the box.
In my situation, I'm trying to create a script that will watch an automatically updating page that uses AJAX, and display an alert when the content of the page changes. The exact use is with a chat box called CBox. They use AJAX to display new posts in the chat. I use their chat box on my website, but I don't always have it displayed on the page. The user can click a button to display the chat box as an overlay on the page. My goal is to create a script that will watch the chat box while it is not being displayed and call a function whenever the content of the chat box changes, such as if another person posts in the box.