Call custom javascript function as link in online editor

Call custom javascript function as link in online editor

Friday 28 October 2005 2:54:18 am - 6 replies

Author Message

Mazen Alsibai

Sunday 30 October 2005 1:37:48 am

Hi:
you donot have to use javascript to do that,
just write<a href="http://somedomain.com" target="_blank">popup</a>

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

William Steenbergh

Wednesday 07 June 2006 8:07:13 am

try using the {literal} and {/literal} statements around the code for the link. EZ Publish will probably avoid it for parsing.

Marcin Drozd

Wednesday 07 June 2006 11:44:13 am

Hi
I think U should use
<literal class='html'> and </literal>

http://ez-publish.pl

tom stovall

Friday 18 May 2007 11:38:10 am

as of 3.8,

[literal]
AvailableClasses=html

has to be in content.ini.append.php of either siteaccess or override.

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.

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.