leadwave
asked on
Multiple AJAX scripts/functions in one page only runs last function
I've got a page with 3 divs that I need filled using AJAX. So I've got 3 js functions to accomodate that. This is how I've got the section of the page:
<div id="Sect1"></div>
<script type="text/javascript">loa dSect1();< /script>
<div id="Sect2"></div>
<script type="text/javascript">loa dSect2();< /script>
div id="Sect3"></div>
<script type="text/javascript">loa dSect3();< /script>
------------
The problem I'm having is that only the last javascript function seems to be executing. If I re-order the divs with say, Sect1 being last, then that function runs fine, but none of the other 2. I've included an onclick event on each of the divs and that works but I don't want users to have to click each section to load the data.
What am I missing here?
I thank you in advance.
<div id="Sect1"></div>
<script type="text/javascript">loa
<div id="Sect2"></div>
<script type="text/javascript">loa
div id="Sect3"></div>
<script type="text/javascript">loa
------------
The problem I'm having is that only the last javascript function seems to be executing. If I re-order the divs with say, Sect1 being last, then that function runs fine, but none of the other 2. I've included an onclick event on each of the divs and that works but I don't want users to have to click each section to load the data.
What am I missing here?
I thank you in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER