Content Block inside Javascript
Posted: Mon Oct 01, 2007 9:12 pm
Hey Everyone,
I am not sure if this is possible and haven't found any posts yet.
I am trying to put a content block inside a piece of Javascript. It will add the content block to the cms but will publish the code with the content block code in it. Here is an example of what I am trying to do
{literal}
function openmipage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "iframe", "http://www.sitenamehere.com/index.php?p ... d={content block='Slideshow Name' oneline='true'}", "Gallery One", "width=750px,height=500px,left=200px,top=100px,resize=1,scrolling=1")
ajaxwin.onclose=function(){return window.confirm("Close Gallery?")} //Run custom code when window is about to be closed
}
{/literal}
that works with this code to use the dhtml window widget to bring up slideshow pro in a new window
{content block='Slideshow Image' oneline='true' assign='slideshowimage'}
{if $slideshowimage != '' }
{/if}
I would like to be able to allow them to set the id
Does anyone know if this is possible?
Thanks
I am not sure if this is possible and haven't found any posts yet.
I am trying to put a content block inside a piece of Javascript. It will add the content block to the cms but will publish the code with the content block code in it. Here is an example of what I am trying to do
{literal}
function openmipage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "iframe", "http://www.sitenamehere.com/index.php?p ... d={content block='Slideshow Name' oneline='true'}", "Gallery One", "width=750px,height=500px,left=200px,top=100px,resize=1,scrolling=1")
ajaxwin.onclose=function(){return window.confirm("Close Gallery?")} //Run custom code when window is about to be closed
}
{/literal}
that works with this code to use the dhtml window widget to bring up slideshow pro in a new window
{content block='Slideshow Image' oneline='true' assign='slideshowimage'}
{if $slideshowimage != '' }
{/if}
I would like to be able to allow them to set the id
Does anyone know if this is possible?
Thanks