Error calling Jquery functions

Error calling Jquery functions, a forum discussion on Jojo CMS. Join us for more discussions on Error calling Jquery functions on our Suggestions & Feedback forum.

Back to Forum Index : Back to Suggestions & Feedback   RSS
logicbomb

23 Dec 2009
Posts: 20

I have been using JOJO only for a week and I am very much impressed. I am trying to write a custom theme for my site. I am unable to access DOM elements by writing script from head.tpl that leads to Dwoo Exception and even a simple alert doesnt work inside $(document).ready(function(){alert('here'); });. I have attached the stack trace.

Fatal error: Uncaught exception 'Dwoo_Exception' with message 'Plugin <em>alert</em> can not be found, maybe you forgot to bind it if it's a custom plugin ?' in C:\xampp\htdocs\jojocms\plugins\jojo_core\external\dwoo\Dwoo\Loader.php:111 Stack trace: #0 C:\xampp\htdocs\jojocms\plugins\jojo_core\external\dwoo\Dwoo\Compiler.php(2866): Dwoo_Loader->loadPlugin('alert', true) #1 C:\xampp\htdocs\jojocms\plugins\jojo_core\external\dwoo\Dwoo\Compiler.php(1633): Dwoo_Compiler->getPluginType('alert') #2 C:\xampp\htdocs\jojocms\plugins\jojo_core\external\dwoo\Dwoo\Compiler.php(1302): Dwoo_Compiler->parseFunction('<?xml version="...', 6120, 6237, false, 'root', 6186) #3 C:\xampp\htdocs\jojocms\plugins\jojo_core\external\dwoo\Dwoo\Compiler.php(758): Dwoo_Compiler->parse('<?xml version="...', 6103, NULL, false, 'root', 6186) #4 C:\xampp\htdocs\jojocms\plugins\jojo_core\external\dwoo\Dwoo\Template\String.php(369): Dwoo_Compiler->compile(Object(Dwoo_Smarty_Adapter), Object(Dwoo_Template_File)) #5 C:\xampp\htdocs\jojocms\plugins\jojo_core\ in C:\xampp\htdocs\jojocms\plugins\jojo_core\external\dwoo\Dwoo\Loader.php on line 111

I am beginner and Please help.
Rick Rick

23 Dec 2009
Posts: 336

The Dwoo template engine uses curly braces a lot. They haven't smartened it up to think intelligently like the latest Smarty.

Try wrapping your javascript inside {literal} and {/literal} tags... eg

{literal}$(document).ready(function(){alert('here'); });{/literal}
Rick Rick

23 Dec 2009
Posts: 336

Oh, and welcome to the community :)
Back to Forum Index : Back to Suggestions & Feedback   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.