Hi,
I'm building a page with two levels of Ajax controlled content. Either works fine alone, but when Ajax is used to open the first layer, the second, which is nested inside it, doesn't work.
The page, which is at www.mnhub.org, works like this:
There are six links at the top for various topics, including "Agriculture". Here are the link code, Ajax function, and div tag:
<a href=javascript:openag()><font face=verdana color=blue size=2>Agriculture</font></a>
<script type="text/javascript">
function openag()
{
var url = 'HomeAg.php';
var pars = 'catid=6';
var myAjax = new Ajax.Updater('showlogos', url,{method: 'get', parameters: pars });
}
</script>
<div id="showlogos"></div>
That opens a set of links and features below "Agriculture". One of those sets is a list of Featured Links, like corn or soybeans. For some of these I want to place an Ajax powered link to open an RSS feed to the right.
I'm using exactly the same stuff as for the "Agriculture" link but with different parameters and div ids. Here is the code for them:
<a href=\"logos/LogosAllDirect.php?Aware_Category_ID=2048&MenCatID=$MainID \"><font face=verdana color=blue size=1></a></font> <a href=javascript:getcorn()><img src=\"rss.gif\" width=\"10\" height=\"10\" border=\"0\" ></a>
<script type="text/javascript">
function getcorn()
{
var url = 'homerss.php';
var pars = 'cat=2048';
var myAjax = new Ajax.Updater('showrss', url,{method: 'get', parameters: pars });
}
</script>
<div id="showrss"></div>
This is in the header section:
<script type="text/javascript" src="prototype-1.4.0.js"></script>
Either of these Ajax requests works fine independantly, but when I open the Agriculture section and then click on one of the rss links, like "corn", I get an error message. Is there a limit to the number of Ajax requests you can make on a single page?
I would appreciate any advice you can give.