I got a javascript variable(siteContents) i want to add a dynamic div to it with hyper link that pops it up . The dynamic div has dynamic div id and dynamic frame url.The button that activates the dynamic div also got dynamic name and dynamic value.
could any one show me how i can add both dynamic div and its button to siteContents variable ?
Note1: all dynamic values shown in bold.
Note2:dynamic value = itemName.
This is dynamic div that i want to add to my siteContents variable:
This is hyperlink that activates the above dynamic div. I want to add this too my siteContents variable:
this is the part that activates the popup div:
current code:
could any one show me how i can add both dynamic div and its button to siteContents variable ?
Note1: all dynamic values shown in bold.
Note2:dynamic value = itemName.
This is dynamic div that i want to add to my siteContents variable:
JavaScript:
<div id="[b]mangodiv[/b]" style="display:none">
<li>
<iframe src="[URL unfurl="true"]http://www.mysite.com/?itemid=[/URL][b]mango[/b]&bgcolor=white" style="border: medium none;" height="300" width="450"></iframe><br>
</li>
</div>
This is hyperlink that activates the above dynamic div. I want to add this too my siteContents variable:
JavaScript:
<li><a href="#" onClick="divwin=dhtmlwindow.open('divbox', 'div', '[b]mangodiv[/b]', '[b]mango[/b]', 'width=450px,height=300px,left=200px,top=150px,resize=1,scrolling=1'); return false"><b>Create/ Open Window 4</b></a></li>
this is the part that activates the popup div:
HTML:
<head>
<link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
<script type="text/javascript" src="windowfiles/dhtmlwindow.js">
</script>
</head>
current code:
JavaScript:
[b]var itemName = 'mango'[/b]
var siteContents = "<li>"
+"<iframe src='[URL unfurl="true"]https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTeUusgzharBX4HTwmQHNZOimpaCGRBx4CLKNJAiLjUVi12VN66'[/URL] height=200 width=200 style='border: none;'></iframe><br>"
+"<div class='details'>"
+"<div class='title'>"
+"<a href='[URL unfurl="true"]https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTeUusgzharBX4HTwmQHNZOimpaCGRBx4CLKNJAiLjUVi12VN66'[/URL] target=\"_blank\"'>"[b]+itemName+[/b]"</a><br>"
+"</div></div></li>";
document.getElementById("myDiv").innerHTML += siteContents;
<ul id="myDiv"></ul>