1

This question already has an answer here:

Where should I put the php files that I will be using to perform Ajax requests in my custom component? for example I need to populate a certain dropdown list based on an input? The php file that i will be using will return the html formatted data that will be put to a dropdown list.

marked as duplicate by Valentin Despa Feb 3 '15 at 20:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You keep your files in in the directory belonging to the extension you wish to integrate Ajax – Lodder Feb 3 '15 at 10:39
  • I will use it in my custom component. Where will i put it? – Break the Law Feb 3 '15 at 10:40
0

If you are building component , then it is best to write in your component's controllers file and for module write in helper file and use com_ajax

  • Do you mean I should write the function I need to the custom component's controller file? or in my component's controllers folder, i will create a php file in there? – Break the Law Feb 3 '15 at 10:42
  • yes, can't we do that? create a function which will create drop down html markup in a related controller file (job you are trying to achieve). call it from ajax url get the response and update the required section in DOM – subashbasnet8 Feb 3 '15 at 10:43
  • I will try. Thanks for your response. I am completely new to Ajax refresh. – Break the Law Feb 3 '15 at 10:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.