Search code examples
ajaxiframejoomlamp3

How do I use Ajax in a Joomla! site for an Mplayer drop-down P3 instead of an iframe drop-down?


How do I use Ajax in a Joomla! site for an Mplayer drop-down P3 instead of an iframe drop-down?

The goal is when someone's playing the MP3 player and browsing through the site the song stays playing and each time the page reloads it doesn't start over iframe is doesn't really help that much because it's one thing need something that will work with Joomla.


Solution

  • One simple way achieving this using a classic HTML FrameSet:

    1. Create a FrameSet with two Frames:

      • Frame 1: Target to your MP3 player web-app
      • Frame 2: Joomla site
    2. Modify .htaccess to load the custom set of frames when entering the site instead of the plain Joomla template. Assuming your FrameSet is named start.php

      DirectoryIndex start.php index.php

    So now whenever a link on your Joomla site is clicked it loads within frame 2. The player in frame 1 keeps playing... ♩ ♪ ♩ But note that a page refresh via your browsers native button still means that the music stops (as the FrameSet is gone). Find some more details in this German blogpost or via Google translate.