0
votes

I like to create a custom module in which I have a select list which on change has to select data from db and show the data.

How can I give the url in the ajax call in my module's helper function?

2

2 Answers

0
votes

You create a module with a custom position then you load your module in a new article.

Every article has an ID and an ALIAS.So the url will be like that

http://myurl.gr/ID-ALIAS.html?tmpl=component&type=raw

For more details check the below link:
How to load a custom html module using ajax-call joomla 2.5

-1
votes

You can use something like this :

function datadelete(id){

 var dataString = 'id='+ id;
 $.ajax({
        type: "POST",
        url: "index.php?option=componentname&task=deleteecontacts&type=ajax",
        data: dataString,
        cache: false,
        success: function(msg)
        });
}

I hope this will give you an idea about how to pass URL in Ajax call using Jquery