Page 1 of 1

[SOLVED] Google Donation Button "Smarty Error"

Posted: Wed Dec 24, 2008 6:25 pm
by CMSmonkey
I need to add a Google donation button to my page.  I inserted the form script into the HTML portion of the content editor, but I am getting the following error code at the top of the page:

Code: Select all

string(180) "Smarty error: [in content:content_en line 8]: syntax error: unrecognized tag: if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){ return true; (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 8]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(192) "Smarty error: [in content:content_en line 9]: syntax error: unrecognized tag: alert('You must enter a valid donation.'); amount.focus(); return false; (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 9]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" 
What does this mean?  Is it possible to have the donation button on the site?

----------
MODIFIED THREAD:
Read on another thread that if you add {literal} {/literal} around the js script, it will clear the problem. :)

Re: [SOLVED] Google Donation Button "Smarty Error"

Posted: Thu Dec 25, 2008 9:19 pm
by Dr.CSS
Yes most times smarty error is from trying to use things smarty looks for in a way it doesn't compute, most times it's {  }...