Page 1 of 1

How to put a Javascrpt in <head>

Posted: Thu Feb 14, 2008 3:29 pm
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

Re: How to put a Javascrpt in <head>

Posted: Thu Feb 14, 2008 4:00 pm
by Nullig
Put:

Code: Select all

{literal}
before it, and:

Code: Select all

{/literal}
after it.

Nullig

Re: How to put a Javascrpt in <head>

Posted: Fri Feb 15, 2008 11:40 am
by Torpedine
Thank you very much  ;D