Which should I be using for this type of action:
I have 4 small <div>s above a larger <div> cach containing text News01, News02, News03, News04. Kinda like this:
-----DIV 1-----DIV 2------DIV 3----DIV 4-----
**|News01||News02||News03|*|News04|
Date : Author
MSG
MSG--------------DIV 5(Large one)-------------------
MSG
*
What I want it to do is when someone clicks on the text in the top 4 <div>s to change the content in the big <div> according to what tab they clicked on. I.e. if they clicked on "News01" whatever content is contained in a variable $News01 is displayed in the large <div>.
I could just link it and have it refresh the page, but the problem is I have another set of <divs> indentical to the example above for Events. So it would only change the content in the News window if a news0X link was clicked or change the content in the Events window if event0X was clicked.
So my question is, would it be easier to layer 4 large dividers on top of each other and whenever a tab was clicked have a OnClick java script behavior make the other 3 divs hidden while the requested one is visible. (If I can do that.)
Or is there some way in PHP I might be able to do this?