I’m a bit simple when it comes to mixing languages and hoped somebody could advise me.
I have a page-turning magazine viewer, which is embedded on my webpage using Javascript like so:
<script type="textjavascript">
var attributes = { id: 'issuuViewer1' };
var params = {
allowfullscreen: 'true',
allowScriptAccess: 'always',
menu: 'false'
};
var flashvars = {
jsAPIClientDomain: 'issuu.com',
mode: 'embed',
layout: 'http%3A%2F%2Fskin.issuu.com%2Fv%2Flight%2Flayout.xml',
showFlipBtn: 'true',
documentId: '080311154822-183d3d8334a544518a0d5e324f2543d4',
docName: 'gan_issuu',
username: 'Jesper',
loadingInfoText: 'Greek%20Architecture',
et: '1251988902514',
er: '29'
};
swfobject.embedSWF("http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf", "myContent1", "420", "264", "9.0.0", "swfobject/expressInstall.swf", flashvars, params, attributes);
</script>
What I would like to know, is can I populate some of these settings with ASP. So instead of line:
documentId: '080311154822-183d3d8334a544518a0d5e324f2543d4',
Can I have something like this incorporating ASP?
documentId: '<%=rs.Fields("documentID")%>',
Yes, it would be valid to populate a JavaScript object using ASP like this. See the recent question that was about doing this with PHP:
Is it considered bad practice to have PHP in your JavaScript