Programmatic control of which modules are displayed on a page in Joomla 3.1

I am trying to figure out a way to control which module is displayed in a given position on a given page in Joomla 3.1.  What I want to do is as follows;

Have one module that displays three buttons (labeled A, B, C for the sake of argument), and for these buttons to control which of three other modules (let's call them module 1, module 2, and module 3) is displayed in a different position on the page.

So assuming for sake of argument that the module with the buttons is in position 2 (as defined in the template) and I have another module position defined as position 7 (for example), is there a way for the module displayed in position 7 to be determined by which button is pressed in the module displayed in position 2.

The result would be that if button A is pressed, module 1 would be displayed in position 7, if button B were pressed module 2 would be displayed in position 7, and if button C were pressed, module 3 would be displayed in position 7.

I can think of a way of doing this (I think) by having three separate pages, identical but for the module assigned to position 7, with each button linking to a different page, but that seems an unsophisitcaed way to do things.

I've been digging around online to find something like this but I can't find anything that even points me in the right direction.  It may not be possible but I am not familiar enough with Joomla to figure out whether it is or not.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter HartCommented:
that's not how Joomla works.
the modules are loaded when the page is displayed - there is also the consideration of the caching side of joomla then the modules you be preloaded.
if you have a page on display and you press a button it cant load a new module it would have to refresh the page and reload the page  with the different module but the modiles are defined  at start up.
your idea of 3 separate pages would be the answer.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gpeaxcelAuthor Commented:
OK Thanks for this perspective.  I had a feeling that this would be the case but had hoped there might be some way to achieve what I was looking for.   Doing it without the need for a page refresh would be good but I can see why that's not feasible the way I was thinking of it.  I will continue to dig around and see if there are other creative approaches I can come up with but in the mean time will go with the three separate pages approach.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.