Page 1 of 1

Embedding external link javascript to page content

Posted: Fri Sep 02, 2005 12:41 am
by Essie
This is not the same question as asking how to embed javascript in template pages.  I know to use {literal}{/literal} tags. My trouble now is when I am actually creating or editing a page content, how do I include write so that CMS will show the linked external javascript?

I tried using {literal} tag, and even use the acutal html code

Code: Select all

 <__script__ src="/javascript/time_greeting.js"></__script>
to no avail.  What is the correct coding format to use?  Or is javascript simply not allowed to be used on tinymce?  Thanks.

Essie

Re: Embedding external link javascript to page content

Posted: Mon Sep 05, 2005 5:24 am
by Essie
Thanks, Patricia for your tip.  I too found out that the {literal} tags only applies to the template and not the file itself.  I couldn't do  javascript within the file but it's ok if I place within the template itself.

Re: Embedding external link javascript to page content

Posted: Mon Sep 05, 2005 5:42 am
by jah
Not sure if I understand the question fully, but I have included a javascript in my page content like this: 

Code: Select all

{literal}  <__script__ language="JavaScript" src="uploads/scripts/xyzscript.js" /> {/literal}
I added this line in source mode, and when I use the TinyMCE WYSIWYG mode I can see "{literal}  {/literal}".
I think this is normal behaviour since a WYSIWYG editor should not show html tags.
If you want to edit whats inbetween the tags you could always click at the source button.

Jon