Forums / Setup & design / Include a JavaScript

Include a JavaScript

Author Message

Mark Mollerus

Wednesday 14 September 2005 11:20:02 pm

How i can include a JavaScript into an article?

If i try to use the literal-tag, i see the source, not the script self.

I have added the script-tag over the admin-interface into content.ini and cleared cache.

i see the setting in the admin-interface for the content.ini:
siteaccess [10] script
but it dosnt work. The systems says:
unsupported tag(script)

Kristof Coomans

Wednesday 14 September 2005 11:35:48 pm

Put this in your template:

<script type="text/javascript">
<!--
{literal}
...
{/literal}
-->
</script>

Replace ... with your JavaScript. Does it work?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Ɓukasz Serwatka

Wednesday 14 September 2005 11:45:57 pm

Or ...

<script language="JavaScript" type="text/JavaScript" src="path_to_your_script/script.js"></script>

And make sure that re-write rule (if setup) exclude script file.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog