If you're using ChosenJS, which is the fancy select library that Joomla 3.x uses, then you'll need to manually instruct it to update the list, because it doesn't use any observers by default.
You can do this by using the following:
You'd be best off using the jQuery global scope and passing $ as an alias inside the function instead:
This helps prevent any conflicts with other 3rd party libraries that also use the $ namespace.
What you should do is include &format=json in your URL. This tells Joomla that you want a JSON response rather than HTML, and it won't run (subsequently) your template to produce all your page HTML.
The usual approach is to call
in your controller code (ie in submit()). This will cause Joomla to look for a display() function in a ...
Administrator side's ContentModelArticles does not support filtering by ID.
ContentModelArticle does support it. The state property name is article.id:
If this is a frontend module you might want to use the frontend articles model:
// Register frontend model classes.
I think what you're looking for is self which can allow your static methods to call other static methods. Without any indication of state and db calls in your question it's difficult to tell what the various methods need.
It is uncommon to use global functions at all in Joomla, and 10 times as uncommon to declare functions in a method. Do let me know if ...
If you still want to use the frontend urls from backend, make sure to call the frontend site appropriately.
Your should use Juri::root() to get site url from administrator instead of Juri::base() or Juri::current().
Juri::root() --> http://mysite.local
Juri::base() --> http://mysite.local/administrator
Juri::current() --> http://mysite.local/...