what method to use for pushing page updates to page/iframes?
-
I've been trying to create a simple method to update iframe content via a mix of asp.net and javascript. I can set a meta refresh, but that makes for a lot of traffic. I had created an aspx page that loaded into a hidden iframe (which did a meta refresh every 60 sec). This aspx would connect to a database and check for updated content, a "yes" or "no" in a table field. If "yes" then it would spit out some javascript code to reload the appropriate iFrame. But, there seems to be a couple of problem with this in that, one, the hidden aspx doesn't seem to load or execute but once. The other is that the javascript code isn't reloading the appropriate iframe. I would think this approach should work. I probably don't have it coded correctly. But, what I want to ask was if this method is a reasonable approach? Is there a better way of doing content updates without a lot of overhead code loading into the browser? Thanks
-
I've been trying to create a simple method to update iframe content via a mix of asp.net and javascript. I can set a meta refresh, but that makes for a lot of traffic. I had created an aspx page that loaded into a hidden iframe (which did a meta refresh every 60 sec). This aspx would connect to a database and check for updated content, a "yes" or "no" in a table field. If "yes" then it would spit out some javascript code to reload the appropriate iFrame. But, there seems to be a couple of problem with this in that, one, the hidden aspx doesn't seem to load or execute but once. The other is that the javascript code isn't reloading the appropriate iframe. I would think this approach should work. I probably don't have it coded correctly. But, what I want to ask was if this method is a reasonable approach? Is there a better way of doing content updates without a lot of overhead code loading into the browser? Thanks
If you want the page to refresh itself, a js timer is the only way to do that. If only part of the page refreshes, you can use AJAX to make requests for that data.
Christian Graus Driven to the arms of OSX by Vista.