Skip to main content
June 2, 2008
Question

Discussion Board

  • June 2, 2008
  • 3 replies
  • 315 views
I've created a discussion board with Dreamweaver and Coldfusion. The details of the messages (author, subject, date posted etc.) are in a table.

I want one of the cells in the table to display the number of the record/message a person has clicked on. It would be something like: "Message 8 of 160". It would naturally change when a visitor clicked on another cell.

I'd be very grateful if someone could direct me to the kind of code I'd have to write to do this. I imagine I'd need some 'on click' command and a query to search the message database to find the row number for that record.

I thank you in advance for your help.
    This topic has been closed for replies.

    3 replies

    Inspiring
    June 2, 2008
    You could make the query a session variable and the row number a url variable.
    June 2, 2008
    Thanks, but how do I connect the clicking of a cell in a row by a user to the currentrow?
    Inspiring
    June 2, 2008
    It depends on what you mean by "Message x of y". If you are referring to a database table, some db's allow you to select the row number. Syntax is db specific.

    If you are referring to a specific discussion, then you could use the currentrow and recordcount variables of cfquery.