What is bad about having a <script>
tag inside <div>
inside <body>
?
I'm dynamically updating a <div>
to reload a JavaScript code inside a <div>
. Are there any issues to worry about ?
Edit
As @Bergi insisted on seeing the code. Here it is(see below). This div
(along with other div
(s) containing presentation HTML elements) are updated via AJAX. This script
inside div
contains maps to do processing of newly loaded HTML elements on page with raw data.
<div>
<script type="text/javascript">
var namesMap = <dynamic string from server here>;
var addressesMap = <dynamic string from server here>;
</script>
</div>