0
Welcome Guest! Login
0 items Join Now

trying to implement tabs with ajax is it possible got stuck trying

    • 's Avatar

    trying to implement tabs with ajax is it possible got stuck trying

    Posted 16 years 8 months ago
    • I am a member hope this is the right board for this post.
      I have two custom modules that I created for tabs they are side by side and each has 4 tabs(each tab is a unique module) on my home page. I have loaded a module into each tab using (loadposition} but the result is the site is too slow. So i thought I would try using ajax to load each module when that modules tab was clicked. I am stuck trying to figure out how to do this.

      I am trying to call a controller script
      <?
      switch($_GET['tab'])
      {
      case 'tab1':
      echo "tab3 content! Retrieved via Ajax!";
      break;
       
      case 'tab2':
      echo "tab3 content! Retrieved via Ajax!";
      break;
       
      case 'tab3':
      echo "tab3 content! Retrieved via Ajax!";
      break;
      }
       
      ?>

      I can get it to work like this which displays the echo into the tab panel upon click. I just can't figure out how to get a specific module to load or any module .I would like to specify the module by id.

      I am also trying to get the following to work; when a user clicks on a tab on the right hand side make the tab on the left hand side active. 4 tabs on left 4 tabs on right when any tab on right side is clicked corresponding tab on left is active.Also the tabs on the left would be hidden(not seen).

      any hints on how to do this

      Or is this a limitation of joomla not being able to load new modules without a page refresh.
      If it is a joomla limitation of loading a new module without a page refresh could you just run the modules script from within the tab once it was clicked.

      I am sure I am missing something


      John
    • Last Edit: 16 years 8 months ago by John Hartman.

Time to create page: 0.065 seconds