I have two files:
abc.php
<?php
/*
Template Name:ABC Template
*/
?>
<div id="div-image" class="div-child"> <img src="<?php echo get_template_directory_uri(); ?>/Images/Loading.gif" id="load" /> </div>
<script src="<?php echo get_template_directory_uri(); ?>/alphawords.js" type="text/javascript"></script>
xyz.js
document.getElementById("load").src="<?php echo get_template_directory_uri(); ?>/Images/pic.png";
xyz.js is included properly, but image is not being loaded through the JS. How can I get the image to load properly?
Thank you in advance.