Page 1 of 1

Expanding column listing

Posted: Sun Feb 11, 2007 11:00 pm
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.

Posted: Mon Feb 12, 2007 12:54 am
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?

No problem

Posted: Thu Feb 15, 2007 1:33 am
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.