Douglas Johnson
|
Tuesday 19 August 2003 2:09:30 pm
{literal}
<a href="javascript:void(window.open('XXXXXXXXXXXXXX','windowtitle','width=400 height=400'))">image</a> {/literal} I need to replace XXXXXXXXXXXXXX to show an image in the new window. Any ideas???? The only thing I need in XXXXXXXXXXXX is the full path and file name of the image. Surely these exist? From what I've read in these forums, this cannot be done?
|
Mark Kruse
|
Wednesday 20 August 2003 4:32:54 am
I tried to reproduce your problem... But it works for me...
here is the code in my template:
($ImageList is an array I create in a PHP-file with
some images-parameters)
----------------------------------------------
<script>
function newwin(target)
{literal}
{
satellit = window.open(target,'wname', "scrollbars=yes,resizable=yes,width=470,height=500,left=50,top=50");
satellit.focus();
}
{/literal}
</script>
<a href=javascript:newwin('{$ImageList.0.path}');>hi</a>
------------------------------------------
Here is the resulting HTML-Code:
------------------------------------------
<a href=javascript:newwin('/var/storage/variations/image/p/h/p/phpOfm8ls_300x300_331561.jpg');>hi</a>
------------------------------------------ and this works fine. HTH, Mark Kruse
|
Alex Jones
|
Wednesday 20 August 2003 6:36:33 am
Another thought: you may not nead the {literal} wrapper as the code you are wrapping doesn't contain curly braces ({}) except for the eZ publish code which you don't want interpreted as literal. So you may want to try removing the literal tags and use the eZ image path tag I posted earlier to see if it works. Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|