Path

ez.no / ezpublish / documentation / customization / tips & tricks / insert javascript call inside ezpub document


Insert javascript call inside ezpub document

These documentation pages are no longer maintained. Please visit the new documentation site.

HTML code to be inserted into ezpub document:

<div id="scriptnameDiv" style="position:absolute; z-index:987654321; top:0; left:0;">

 <script language='JavaScript' src='script1.js'></script>

</div>

It calls a javascript script that is located on the server. This particular script causes an dynamic layer to open on top of the document with this code inside (before the /body in an HTML document).
How and where would I insert into an ezpublish document?

Comments

not like that

You shouldn't input it in the administration area, but directly in the templates in the directory "/design".

You can try, if it works in the administration area, if you embed it in "<html>...</html>" tags. I.e.:

<html>
<div id="scriptnameDiv" style="position:absolute; z-index:987654321; top:0; left:0;">
<script language='JavaScript' src='script1.js'></script>
</div>
</html>

But I'm not sure if that would work.

It doesn't work

I tried, but it gives me the following error:

Body:
Unsupported tag div(removed)
Unsupported tag script(removed)

Contents

Customization

Access control
eZ publish API Documentation
Content structure
Custom design
Components
Tips & Tricks
    Debugging templates
    Javascript in templates
    Fetching current user
    Showing related objects
    Show which templates are used
    Fetching the ID of the parent
    One Article Folder
    Creating tree menus
    How can I use my own php script insid...
    Hiding attribute content
    Splitting an article over several pages
    Accessing section id in pagelayout
    List articles in folder
    Creating nice URLs
    Alt tag on images
    Improve the pagelayout.tpl
    Clean HTML tags
    Insert javascript call inside ezpub d...
    3rd party applications
    Fetch Function examples
    Display more than 15 items on your co...
    Including PHP files in templates
    Redirecting after content publishing
    HowTo see if article has an image
    Date and Time Formats
    Forms processing example: store user...
    Adjust Timezone
    Adding a Remove Button/Image
    Find the age in years for an object
    Editing, creating and removing conten...
    Indexing binary files with IFilters o...
Troubleshooting


Created

30/06/2003
6:31:34 am
by G Howard

Last updated

04/07/2003
5:06:19 pm
by Bård Farstad

Authors

G Howard
Bård Farstad



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.