Forums / Setup & design / window.open

window.open

Author Message

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?

Alex Jones

Tuesday 19 August 2003 2:18:47 pm

Have you tried {$image.full_path} ?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Douglas Johnson

Tuesday 19 August 2003 2:50:46 pm

{$image.full_path} displays the same page in the new window. Not the image only.

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

Mark Kruse

Wednesday 20 August 2003 4:35:01 am

I forgot something: Are your rewrite-rules correct?

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>