Dear Friends,
I am facing some issues for which I could not find solution so far.
Did lot of search and tried many things. But no use.
I have a GAE app
www.flexlmonline.com where I want to modularize the
entire website code. For this, I have copied the footer into a
separate file and trying to load it dynamically using the below code.
index.html has the code snippet:
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/gui.js"></script>
<div class="footerCont">
<span class="copy" id="crights"></span>
</div>
My gui.js has below code:
$(document).ready(function() {
$("#crights").load("footer.html");
}
The file footer.html is located in the same place where the index.html
file is. When I test this setup, I see the index.html getting
rendered and then at the end of loading the entire page goes blank.
The "Inspect element" in Developer Tools of chrome tells error like
'Uncaught TypeError: const 'request' has already been declared'.
Aparantly the jQuery.load is causing this error. If I disable that
line of code, the page loads normally.
Please help me if I am missing something causing this error? Of is
there a better way to modularize my website code?
Many thanks in advance.
BTR Naidu
www.btrnaidu.com