Firstly, is there a reason you're using print over echo?
Secondly, what you need is AJAX, and as has been said before, the most noob-friendly way to implement it is with jQuery.
http://jquery.com/
The docs are VERY easy to follow, you'll be up and running in no time. You can do this without AJAX, but it will still require some JS. What you could do is have div's that are all have style="display:none;" and an id, save for the default choice. Assuming you're using jquery anyway, get the value of the select menu, and unhide the div that corresponds, while hiding the one that was showing.
Code: Select all
$("#select_id").click(function(){
selected = $("#select_id").val();
switch(selected)
{
// I'm not gunna write the whole thing for ya
// But here you would write the code that shows
// The div you wanna show, and adds a class or CSS
// That hides the div that was already shown
}
});
Note - That was just thrown together in a few seconds. There's probably better ways of doing the non-AJAX method. I would just go for AJAX for now, it'd be a good learning experience.