Hi Guys,
I’m trying to use AJAX to pull in the comments section on my site. Currently, the comments are handled by a module which are accessed like this:
@app/comments/com/comments?key=‘some key’
However, I’m using AJAX on a page with a completely different controller. What does my URL need to be to access the module action?
Mind you, the javascript is an external file, so I can’t “echo” the base url into the script.
Here’s my AJAX call.
function getComm() {
$.ajax({
url: 'comments?key=' + $('.title').data('key'),
type: 'GET',
dataType: 'HTML',
success: function (result) {
$('.comments').html(result);
}
});
}
That just routes to the current controller, which is not what I want. Aside from writing out the explicit url, what should the format be?