canadianjameson
07-26-2007, 05:33 PM
Hi,
I'm posting here in an effort to cover my bases :p I'm using this ajax content loader (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm) to load .htm files into a central div and I had a question:
One aspect of this script is that you must declare the external .js ans css files that you want applied to the page, like so: <a href="javascript:ajaxpage('test.htm', 'contentarea'); loadobjs('external.css', 'feature.js')">test</a>
<div id="contentarea"></div>
Now I'm getting an error that I highly suspect is caused by this feature, or by how the ajax script works: When I load a page into the content area, scripts on both the 'parent' page and 'child' page (test.htm) go a bit wonky... however if I test them separately they work fine. Here is my question:
Theoretically: could the errors be a result of the .js files referencing the <body> tag, wherein once there is a link loaded into 'contentarea' there are technically Two <body> tags or Could they be a result of problems caused by them not being hardcoded into the .htm file but loaded via loadobjs('external.css', 'feature.js') or is there another reason for the mix-ups?
This post is an extension of a thread here:
http://www.codingforums.com/showthread.php?p=592842#post592842
I didn't want to repost so if you need to see it in action, that's the place :D
Thanks again :thumbsup:
I'm posting here in an effort to cover my bases :p I'm using this ajax content loader (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm) to load .htm files into a central div and I had a question:
One aspect of this script is that you must declare the external .js ans css files that you want applied to the page, like so: <a href="javascript:ajaxpage('test.htm', 'contentarea'); loadobjs('external.css', 'feature.js')">test</a>
<div id="contentarea"></div>
Now I'm getting an error that I highly suspect is caused by this feature, or by how the ajax script works: When I load a page into the content area, scripts on both the 'parent' page and 'child' page (test.htm) go a bit wonky... however if I test them separately they work fine. Here is my question:
Theoretically: could the errors be a result of the .js files referencing the <body> tag, wherein once there is a link loaded into 'contentarea' there are technically Two <body> tags or Could they be a result of problems caused by them not being hardcoded into the .htm file but loaded via loadobjs('external.css', 'feature.js') or is there another reason for the mix-ups?
This post is an extension of a thread here:
http://www.codingforums.com/showthread.php?p=592842#post592842
I didn't want to repost so if you need to see it in action, that's the place :D
Thanks again :thumbsup: