Hello! There is a code that replaces the value in a specific block:
<a href="javascript:ReplaceContentInContainer('example1div','Home is clicked')">
Block:
<div id="example1div" style=" padding:10px; text-align:center;"> Project Log </div>
Script:
<script type="text/javascript"> function ReplaceContentInContainer(id,content) { var container = document.getElementById(id); container.innerHTML = content; } </script>
However, if you insert into the replacement (example1div) a picture, a tag img, then the code flies and something incomprehensible happens, for example:
<img src="https://pp.vk.me/c543103/v543103564/1c7f0/Jkk_3iw_NFU.jpg" alt="">
That code flies. What is the problem? Thanks in advance for your help.
href="javascript:ReplaceContentInContainer('example1div','Home is clicked <br><br> <img src="https://pp.vk.me/c543103/v543103564/1c7f0/Jkk_3iw_NFU.jpg" alt="" width="300" height="300"> ')">
This line does not work correctly, although I tried to put quotes in several ways. - Deniss A.