Actions

Talk

Difference between revisions of "Adding Javascript moo.fx to your component"

From Joomla! Documentation

(Code change to fix "undeclared method" error)
 
m (Talk:Adding Javascript moo.fx to your component WIP moved to Talk:Adding Javascript moo.fx to your component: Removing the WIP suffix: the page state should be in the page text itself)
 
(One intermediate revision by one user not shown)

Latest revision as of 12:08, 15 January 2011

I received an error ("Call to undefined method JSite::getDocument()") when I tried the tutorial. To fix it, I changed the code from:

// make mainframe variable available
global $mainframe;      
 
// Load the moo.fx scripts
$document = & $mainframe->getDocument();

to this:

// Load the moo.fx scripts
$document = & JFactory::getDocument();

--Rlfielding 00:03, 1 October 2008 (EDT)