Hi all,
I’m building a Dataview using one of the available provided samples. What I’d like to do is to have access to one of the variables of the data array passed to the DataView object.
I’m using this item template:
<div id="item_tpl" style="display:none">
<div style='box-shadow:1px 1px 5px #444;'>
<div style='padding:4px 20px; overflow: auto'>
<div style="width:100%;">#file#</div>
<div id=#file# style="width:40%; float: left; ">
<script type="text/javascript">
console.log("#"file#");
</script>
<li class='tag'>dummy</li>
</div>
<div style="width: 60%; float: right; " ><center><img src="img/3.png"/></center></div>
</div>
</div>
</div>
Note how the data in #file# is rendered in the <div>
. This works like a charm. However, what I need too is such value within the <script>
tag. Note the console.log entry: that is not working. I get a “#file#” text in the console log.
How can I do that?
Thanks