Jack Rackham
|
Thursday 01 September 2005 3:30:30 am
According to Paul Borgermans "the OpenWindow javascript function called is found in the default pagelayout in the demo's". But I can't find it.
.......
http://ez.no/community/forum/setup_design/building_an_image_gallery ......
<script language="JavaScript"> <!--
function OpenWindow ( URL, WinName, Features ) {
popup = window.open ( URL, WinName, Features );
if ( popup.opener == null ) {
remote.opener = window;
}
popup.focus(); } // --> </script>
|
Kristof Coomans
|
Thursday 01 September 2005 6:59:15 am
Just as you do with any other JavaScript, you can include it in the templates.
{def $url = concat('/layout/set/popup/',$newsx4.item.url_alias)|ezurl( 'single' )}
<div class="title">
<a href="#" onclick="javascript:window.open({$url},'title for new window here', '' );">
{$newsx4.item.name|wash}
</a>
</div>
The third parameter for window.open can contain some extra features. See the Gecko DOM documentation.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|
Jack Rackham
|
Thursday 01 September 2005 10:09:36 am
IE says that there is an error in 341/118
From IE source
<a href="#" onclick="javascript:window.open('/index.php/magasinet/layout/set/popup/nyheter/midtoesten/irak/bildeserie/iraq','title for new window here', '' );">
|
Kristof Coomans
|
Thursday 01 September 2005 11:24:55 am
Is your code really
<a href="#" onclick="javascript:window.open('/index.php/magasinet/layout/set/popup/nyheter/midtoesten/irak/bildeserie/iraq','title for new
window here', '' );">
with line breaks in the title string ('title for new window here')? Remove the line breaks then.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|
Jack Rackham
|
Thursday 01 September 2005 11:51:03 am
I cracked it! The problem was that the <a href="#"..... command was "broken" with a line!(a bug in EZ 3.6.1?) For the record this works.
<div class="left3">
{let news_listx4=fetch( content, tree, hash( parent_node_id, $node.node_id,
sort_by, array( published, false() ),
'class_filter_type', 'include',
'class_filter_array', array( 22 ),
sort_by, array( published, false())))}
{section var=newsx4 loop=$news_listx4 sequence=array(bglight,bgdark)}
{def $url = concat('/layout/set/popup/',$newsx4.item.url_alias)|ezurl(
'single' )}
<div class="title">
<a href="#" onclick="javascript:window.open({$url},'titlefornewwindowhere','resizable=yes,scrollbars=no,status=yes');">
{$newsx4.item.name|wash}
</a>
</div>
{/section}
{/let}
</div>
must not be broken by a line
xxxxxxxxxxxxxxxxxxxxxxThisisjustherefornoline breakinforumxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <a href="#" onclick="javascript:window.open({$url},'titlefornewwindowhere','resizable=yes,scrollbars=no,status=yes');">
|