Dynamic Ajax Content Refresh Error in IE
Good evening, and thank you for offering these forums for assistance.
I have been trying to implement the Dynamic Ajax Content script on a blog I administer. This will save me having to republish the template several times a day because of new content I have to insert, but I cannot get past a problem. The script runs fine when I first load the index page that it's in: the external htm file is pulled in perfectly. But when I hit the refresh button in Internet Explorer, I get a rather generic error message, and even the DIV that's supposed to be the container for the file (which is really nothing more than some HTML and text) doesn't show up when the full page finally loads. Below is the code snippet as I have implemented it:
<script type="text/javascript">
ajaxpage(rootdomain+'/quotenow.htm', 'quoth') //load "quotenow.htm" into "quoth" DIV
</script>
<div id="quoth">
</div>
The script itself in the header section is identical to that on the Dynamic Drive page. Note that this is the implementation that simply automatically loads an htm file without any action by the end user.
Interestingly, the same problem was showing up in Firefox, too, until I noticed that I should be using the rootdomain variable since my Webpage is called both with and without the "www" before the domain name.
So what's going wrong? Is it that part of the initializing script where it checks to see if the page has already been loaded?
If you could help me with this, I would be grateful. Also, I am wondering if this script can be used to call more than one file. In other words, could I load content into, say, sequential DIVs by writing the script above more than once, inserting the appropriate filename and target DIV in each? This is not such an important matter, since I could simply put everything I need to load into one htm.
Again, thank you in advance.