I am facing a challenge with my main program that includes multiple Javascript routines, one of which involves Ajax. The issue I am encountering is related to modifying the attributes of returned html elements within the calling page using another Javascript routine. Despite running several tests, I have been unsuccessful in getting it to work as intended.
Update
The following script is included in the head section:
<script type="text/javascript">
[Javascript code goes here]
</script>
The Ajax call is initiated using the following script:
<script type="text/javascript">;
setTimeout(function() {Ajax();}, 10000);
</script>;
<div id="ReloadThis">Default text</div>;
Upon making the Ajax call, the PHP page returns HTML code similar to this:
echo "<ul id=\"gallery\" style=\"height:325;\">";
echo "<li><img src=\"Image1.jpg\" alt=\"\" /></li>";
echo "<li><img src=\"Image2.jpeg\" alt=\"\" /></li>";
echo "</ul>";
While the fader code works autonomously when used separately, it fails to function properly in conjunction with Ajax calls. This discrepancy has proven challenging for me to resolve.