Community & Support

How to insert javascript+body content into a block

Hello,
I need insert this code into a new block

<head>
some scripts + css
</head>

<body>
some div's
</body>

thanks

Comments

=-=

you can't. A webpage has one head and one body tag. drupal proves it in page.tpl.php

There are multiple methods for handling javascript related tasks. Check the theme developers guide for more information on handling js

OK. Thank you!

OK. Thank you!

You may try adding

You may try adding drupal_add_css() and drupal_add_js() in the block.tpl.php (or a suggestion). These php functions allow to simply add scripts and css to a defined page. I have written a small tutorial on my site.
For the div's, maybe changing the html of the template file will do it.

nobody click here