title: TYPO3 open actionlink in same container
body: <p>I've run into a little Problem with my TYPO3 Extension I created with the Extension Builder.
  The Extension generates a Calendar and shows a list of upcoming events.
  <a href="https://i.stack.imgur.com/KtpZ1.jpg" rel="nofollow noreferrer">Calendar with listed events</a></p>
  
  <p>code list.html</p>
  
  <pre><code>&lt;div id="dncalendar-container"&gt;&lt;/div&gt;
  
          &lt;f:flashMessages /&gt;
  
          &lt;div  class="tx_tbpartnereventcal"&gt;
  
              &lt;f:for each="{events}" as="event"&gt;
                  &lt;f:link.action class="event-cont" action="show" controller="Events" arguments="{events : event}" target="popup"&gt;
                      &lt;span class="event-title"&gt;{event.title}&lt;/span&gt; &lt;span class="event-date"&gt;&lt;f:format.date format="Y-m-d"&gt;{event.date}&lt;/f:format.date&gt;&lt;/span&gt;&lt;br&gt;
                  &lt;/f:link.action&gt;
              &lt;/f:for&gt;
          &lt;/div&gt;
  
          &lt;!--&lt;f:debug&gt;{_all}&lt;/f:debug&gt;--&gt;
  
          &lt;f:format.raw&gt;{scriptDates}&lt;/f:format.raw&gt;
          &lt;script type="text/javascript"&gt;
           //script to generate calendar
          &lt;/script&gt;
  </code></pre>
  
  <p>the list is created via the standard listAction in the controller and the elements can be clicked to show detailed information about each event.</p>
  
  <p>However, when clicking on a linked Listitem, it reloads the pluginarea with the deatailed information as a new page. I would prefer it if the div.tx_tbpartnereventcal would just change the content of itself to the detailed information.</p>
  
  <p>I have no idea however, how to get that working with ajax in TYPO3 or if there is another way.</p>
  
  <p>Code controller action list and show:</p>
  
  <pre><code>/**
   * action list
   *
   * @return void
   */
  public function listAction()
  {
      $events = $this-&gt;eventsRepository-&gt;findAll();
      $this-&gt;view-&gt;assign('events', $events);
  
  
      /* get all events and turn into json for js calendar */
      $allNotes ='';
      /** @var Event $event */
      foreach ($events as $event) {
          $tempArr=array("date"=&gt;$event-&gt;getDate()-&gt;format("Y-m-d"), "note" =&gt;$event-&gt;getTitle(), "description" =&gt; $event-&gt;getLink(), "optional"=&gt; "stuff");
          $allNotes .= json_encode($tempArr).",";
      }
  
      /* create script to use data in js in .html */
      $script = "
      &lt;script&gt;
          var jsondate = [".$allNotes."];
      &lt;/script&gt;
      ";
  
      /* send js script to list.html to insert into js calendar */
      $this-&gt;view-&gt;assign('scriptDates', $script);
  }
  
  
  /**
  * action show
  * 
  * @param \TBPartnerNet\TbPartnerTerminkalender\Domain\Model\Events $events
  * @return void
  */
   public function showAction(\TBPartnerNet\TbPartnerTerminkalender\Domain\Model\Events $events)
  {
     $this-&gt;view-&gt;assign('events', $events);
  }
  </code></pre>
  
  <p>Am thankfull for any help!</p>