![]() |
Change content of a tab with ajax - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Change content of a tab with ajax (/showthread.php?tid=65316) |
Change content of a tab with ajax - Headpetrol - 05-28-2016 Hi guys! I have searched the forum, but I did not find a solution to my problem. What I am trying to do is a list (select) where a user chooses a matchday to display. If the user chooses matchday 1 then matches from that match day show up in the tab. Here is an example of what I am trying to create. If you change the Spieltag value than the results change to that match day. What I got so far is this Controller Stats Code: function _fixtures(){ Code: function get_matchfixtures($compid, $matchday) { Code: <select id="matchomgang" name="matchomgang" onchange="chooseMatchday(this.value);"> Ajax Code: function chooseMatchday(str) Hopefully someone can help me find a solution to this. Best regards. Headpetrol RE: Change content of a tab with ajax - skunkbad - 05-28-2016 You mention that you're having a problem, but you don't say what the problem is. When I change the value in the Spieltag dropdown, I don't think there is an AJAX request that is triggered. It seems to me that the whole page is reloaded. This is easy to do. You just use javascript to monitor the dropdown for a change event, and when there is a change you create a URL and redirect to it. |