17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2026 Views |
-
Associating a javascript file to each page, and not in Page.php or template

7 December 2008 at 11:01am Last edited: 7 December 2008 11:02am
I know how to include a JavaScript file in Page.php, and in the template, but what this loads the javascript regardless if you use it or not.
I was wondering if there is a way to associate a javascript file to each of the pages, so that it is loaded when called, or needed.
The admin content editing area cleans out <script> put in the html code, is there a way to leave the <script> code in?
thanks!
-
Re: Associating a javascript file to each page, and not in Page.php or template

7 December 2008 at 10:02pm
I have found a solution to this problem.
The solution is to modify cms/javascript/tinymce.template.js and a line in:
valid_elements : (near line 43)
to allow <script> in your TinyMCE HTML
For more detail please check out this link:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elementsThis way, I can include the <script> to the HTML, to only the page I want.
| 2026 Views | ||
|
Page:
1
|
Go to Top |

