Page 1 of 1

javascript question???

Posted: Fri Mar 19, 2010 4:53 am
by maskcomp
I have a slide show on my website that's written in Java Script. The CMS is giving me this error:

string(269) "Smarty error: [in tpl_head:23 line 10]: syntax error: unrecognized tag:

Can you tell me how to add the code to the CMS? Here's the code I'm using-




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=0;v2--){this[this.length]=v1[v2];}return this.length;}}if (!Array.prototype.splice){Array.prototype.splice=function(){var v1=arguments,v3=new Array(),v4=new Array(),v5=0,v6=v1[0],v7=v1[1];for (v5=0;v5v3.TLS4.length-1){v4=v3.TLS4.length-1;}else if (v4',v6,v7,v8;if (!v3.TLS5.complete){v6="flvFTLS3('"+v2+"',"+v4+")";setTimeout(v6,50);return;}if (v3.TLS4[v4][1]!=""){v5+='';}v5+='';if (v3.TLS4[v4][1]!=""){v5+='';}v5+='';if (v3.TLS4[v4][2]!=""){v5+=''+unescape(v3.TLS4[v4][2])+'';}v7=v3.TLS4[v4][3];if (!v3.TLS1||v7==25){if (document.layers){v3.document.open();v3.document.write(v5);v3.document.close();}else {v3.innerHTML=v5;}}else {v3.contentEditable=true;if (v3.filters[0]&&v3.filters[0].status==2){v3.filters[0].Stop();}if (v7==0){v8="blendTrans(Duration="+v3.TLS10+")";}else {v8="revealTrans(Duration="+v3.TLS10+",Transition="+(v7-1)+")";}v3.onfilterchange=flvFTLS6;v3.style.filter=v8;v3.filters[0].Apply();v3.innerHTML=v5;v3.filters[0].Play();v3.contentEditable=false;}}

function flvFTLS2(){//v1.1
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4=v1[1],v5=v1[2],v6,v7,v8,v9;if (v3&&v3.TLS4){flvFTLS4(v2);if (v5==0||v3.TLS7==0){if (v4==1){v6=v3.TLS11+1;if (v6>v3.TLS4.length-1){v6=0;if (v3.TLS12==0){return;}}}else {v6=v3.TLS11-1;if (v6

Re: javascript question???

Posted: Fri Mar 19, 2010 6:59 am
by Wishbone
Wrap {literal} {/literal} around your javascript. Smarty sees the curly braces in your javascript and thinks that it is a smarty tag.

Can someone make this a sticky? This question is posted every 3 days or so.

Re: javascript question???

Posted: Fri Mar 19, 2010 1:23 pm
by calguy1000
I'd make it a sticky but it wouldn't make a difference.  People just aren't bothering to search.
Therefore, I don't bother to  answer.

Re: javascript question???

Posted: Sat Mar 20, 2010 3:06 am
by Dr.CSS
If they just look in the default templates it explains this exact problem of putting anything in your template with {  } in it...

Re: javascript question???

Posted: Sat Mar 20, 2010 7:35 pm
by maskcomp
THANKS Wishbone....

To Calguy1000 and Dr. CSS, please keep in mind that we are not all TECH HEADS. I'm more of a graphic/web designer and don't know a lot about code.

So let's all just play nice ... OK?

Re: javascript question???

Posted: Sat Mar 20, 2010 10:26 pm
by Dr.CSS
You don't have to be a TECH HEAD to just look thru the default templates and read the comments, it's right near the top...