Hello Squiz support,
I am trying to print squiz asset AFTER simple frontend javascript onclick. Please see the following sample code:
<div class="row row-tight">
<div>
<p><a href="#" data-reveal-id="blah1" class="cta-secondary" onclick="clickedElement(this)">Scopus form test</a>
</p>
<div id="blah1" class="reveal-modal" data-reveal="" aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<!--@@DYNAMIC@@-->
</div>
</div>
<div>
<p><a href="#" data-reveal-id="blah2" class="cta-secondary" onclick="clickedElement(this)">Funding Institutional form</a>
</p>
<div id="blah2" class="reveal-modal" data-reveal="" aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<!--@@DYNAMIC@@-->
</div>
</div>
</div>
<script evalkeywords="post">
function clickedElement(elemId) {
var lightboxId = elemId.getAttribute('data-reveal-id');
var html;
if ( lightboxId == 'blah1') { // clear the content of the other lightbox
document.getElementById('blah2').innerHTML = '';
html = print('%globals_asset_contents_raw:7777777'); // blah1 i.e., #7777777 is printed AFTER js event click
}
else {
document.getElementById('blah1').innerHTML = '';
html = print('%globals_asset_contents_raw:8888888'); // blah2 i.e., #8888888 is printed AFTER js event click
}
return elemId.getElementById(lightboxId).innerHTML = html;
}
</script>
End result is that globals_ are printed despite the attribute inlined into script tags evalkeywords=“post”
Am i missing something here, would please help.
Thanks in advance!