jquery ajax-calls and jexec or die - Joomla! Forum - community, help and support
hi there,
trying jquery based axaj calls in module. when implemented required security in module php file rendering ajax called json data wont work.
defined('_jexec') or die( 'restricted access' ); --> keeps them working properly.
i red somewhere might have go throught index-file calling component/module!?
but dont know how facilitate ajax call way , whether works modules same way components. there simple example module out there showing that?
many thanks.
tom
for example:
module: mod_mygallery.php
php-ajax: getgallery.php
trying jquery based axaj calls in module. when implemented required security in module php file rendering ajax called json data wont work.
defined('_jexec') or die( 'restricted access' ); --> keeps them working properly.
i red somewhere might have go throught index-file calling component/module!?
but dont know how facilitate ajax call way , whether works modules same way components. there simple example module out there showing that?
many thanks.
tom
for example:
module: mod_mygallery.php
php-ajax: getgallery.php
you're trying file typing '/path/file.php'
you should use: '/index.php?option=com_yourcomponent&view=something&cid=43'
that way you're letting joomla initialize , no errors should occur!
you should use: '/index.php?option=com_yourcomponent&view=something&cid=43'
that way you're letting joomla initialize , no errors should occur!
Comments
Post a Comment