How to put a Javascrpt in <head>

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.
Post Reply
Torpedine
Forum Members
Forum Members
Posts: 142
Joined: Thu May 18, 2006 3:53 pm

How to put a Javascrpt in <head>

Post by Torpedine »

Hello everybody. I don't know how to insert a javascript in , a DreamWeaver Rollover script:


0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i


Because it generates errors:

string(203) "Smarty error: [in template:22 line 9]: syntax error: unrecognized tag: //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p); (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in template:22 line 17]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(311) "Smarty error: [in template:22 line 25]: syntax error: unrecognized tag: //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2]; (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in template:22 line 25]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"

How can I do? Script put in a external file does not work
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: How to put a Javascrpt in <head>

Post by Nullig »

Put:

Code: Select all

{literal}
before it, and:

Code: Select all

{/literal}
after it.

Nullig
Torpedine
Forum Members
Forum Members
Posts: 142
Joined: Thu May 18, 2006 3:53 pm

Re: How to put a Javascrpt in <head>

Post by Torpedine »

Thank you very much  ;D
Post Reply

Return to “CMSMS Core”