Patrick Kaiser
|
Friday 28 October 2005 2:54:18 am
hi all, does anybody know how a custom javascript-function could be called via a link inserted by the online editor? I basically just want to open a link in a new window having special attributes and a given size.
so the link would look like: <a href="javascript:popup('http://somedomain.com', 300, 300)">popup</a> in pagelayout i defined the javascript-function 'popup'. but when i insert the link via the 'insert-link'-dialoge of the online editor (link-type: other) i get the following error message after publishing: 'Tag a has wrong format (removed).' Any ideas? I search through all the forums, but nobody seems to have wanted calling popups from within ezxmltext-fields.. thanks, patrick
Best regards,
Patrick
|
Patrick Kaiser
|
Sunday 30 October 2005 2:50:59 am
Thanks for your answer, but that is not what i want to archieve. of course i know that i can open the page in a new window, but my client wants to have a new window without title-, navigation- and scroll-bar opening in a fixed, non resizable size. and this can only be done via javascript. this is the script:
<script language="JavaScript" type="text/javascript">
<!--
function popup(url, popupwidth, popupheight)
{
popup = window.open(url, "popup", "dependent=yes,resizable=no,width=" + popupwidth + ",height=" + popupheight + ",scrollbars=no,locationbar=no,menubar=no,status=no,screenX=" + ((screen.availWidth - popupwidth) / 2) + ",screenY=" + ((screen.availHeight - popupheight) / 2) + ",left=" + ((screen.availWidth - popupwidth) / 2) + ",top=" + ((screen.availHeight - popupheight) / 2));
popup.focus();
}
//-->
</script>
i know that this script and the way i'm calling it is working. the problem is that ez is removing the 'javascript:...' after publishing :-(
Best regards,
Patrick
|
Markus Bader
|
Saturday 19 May 2007 1:10:44 pm
I think it was not mentioned in eZ for the editors that they could use code, because the online editor is for content management and not for template coding. However - removing this "validation" from the php file in the kernel would be a solution.
|