Expanding column listing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SoreE yes
Forum Commoner
Posts: 32
Joined: Wed Oct 11, 2006 3:59 am

Expanding column listing

Post by SoreE yes »

Can you point me in the right direction? I have a three column page. On the right hand column there is a listing of titles. I want to click on a button in this column so that the column now shows the title with reviews, but the rest of the page remains the same. All of the information is stored in a mysql database.


To go from this:
  • The Godfather
    The Godfather Part 2
    The Godfather Part 3
to this:
  • The Godfather
    Probably one of the best films ever.

    The Godfather Part Two
    On a par with the first of the trilogy.

    The Godfather Part Three
    Probably not one of the best films ever.


I thought I might use $POST_SELF , but have only seen this used in forms.
james.aimonetti
Forum Newbie
Posts: 6
Joined: Tue Jan 30, 2007 10:44 pm

Post by james.aimonetti »

One option would be to load the reviews into a hidden div, and use a javascript onclick event to unhide the div.

Server-side, the button could be in its own form that submits back to the same page but with a hidden variable set to toggle loading of reviews on the page.

A little AJAX could be used if you wanted to do single movie review loading. Any of these jive with your setup?
SoreE yes
Forum Commoner
Posts: 32
Joined: Wed Oct 11, 2006 3:59 am

No problem

Post by SoreE yes »

Thanks for your response. I thought this would be difficult and have put off doing it for days. As it turned out it was remarkably easy. Just as you said, (I used server side scripting) and posted the variable back to itself.
Post Reply