Load a whole template of a website in a slide of accordion. Is it going to work?

Hello, i would like to advise me on sthg.

Well, i have already built a website using a)MySQL b)HTML c)PHP and d)Javascript.

My website consists of basic html pages/templates which have links to the left and point to another templates/pages.
For example, i have 4 templates
1st template is for: News
2nd : Library
3nd : Articles
4th : E-shop

Each template consists of links to another pages, that means that they don’t contain only text but links too and a search engine.

Well, i’m thinking of adding some animation in my website using the jquery library.Let’s say we have an accordion which has 4 choices and when the user clicks on the first choice the 1st template(NEWS) appears inside the slide of accordion, not in a new page!!!This is what i would like to do, to place in each slide one of my templates. CAn this be done???
Which are the disadvantages of adding in each slide of the accordion a different template for my site and remain in the same slide when the user clicks in one of the links of the template???
Consider that i’m using dynamic content and not static, i have a MySQL database behind.

Also,as i have seen in most examples the options of accordion usually contain an image, a content, a text or links to another pages which open i new windows and tabs!!!i would like to have a template which loads in the same slide each time the user clicks on a link of it.

I would be glad if sm could advise me!
Thanks, in advance!!!

Why not just use an iframe within the accordian content pane and change it’s source when clicking on one of the links in the LHS menu.

e.g. you could do something like:

<a href=“http://www.google.com” onclick=“function() { myIframe.src = this.href; return false; }”>Link 1</a>

This is just an example and considered bad practice to place inline javascript calls on elements, but you get the idea.

You could use a method I’ve been developing, which I call the livescript method.

It consists of the changeScript function and your current script with a few modifications.

Here’s an example of a basic livescript page

Just change the way you output your page, either as html or as javascript. Then you can add you javascript accordian affect within your php script that would usually be outputting your html