window.addEvent('domready', function(){
$('ajax-replace').addEvent('click', function(event) {
//prevent the page from changing
event.stop();
//make the ajax call, replace text
var req = new Request.HTML({
method: 'get',
url: 'components/com_cooltracks/assets/lib/social.php?format=raw',
data: { 'do' : '1' },
onRequest: function() { alert('Request made. Please wait...'); },
update: $('message-here'),
onComplete: function(response) { alert('Request completed successfully.'); $('message-here').setStyle('background','#fffea1');
}
}).send();
});
//init Joomla Framework
define( '_JEXEC', 1 );
define( '_VALID_MOS', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/../../../..' ));
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe = JFactory::getApplication('site');
JPluginHelper::importPlugin('system');
$dispatcher = &JDispatcher::getInstance();
$dispatcher->trigger('onBeforeDisplayContent');
start php
//init Joomla Framework
define( '_JEXEC', 1 );
define( '_VALID_MOS', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/../../../..' ));
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe = JFactory::getApplication('site');
JPluginHelper::importPlugin('system');
$dispatcher = &JDispatcher::getInstance();
$dispatcher->trigger('onAfterRender');
end php
{JFBCLike href=http://www.sourcecoast.com layout=standard show_faces=true show_send_button=true width=300 action=like font=verdana colorscheme=light}
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.