Embedding external link javascript to page content

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Essie

Embedding external link javascript to page content

Post 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
Essie

Re: Embedding external link javascript to page content

Post 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.
jah
Forum Members
Forum Members
Posts: 147
Joined: Thu Dec 30, 2004 9:09 am

Re: Embedding external link javascript to page content

Post 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
Locked

Return to “CMSMS Core”