Hey all,

I am currently working on a simple page that lists all current tickets for my small company. I want to be able to click on a ticket in the list, and expand the page with all replies etc for that ticket.

basically something that would look like:

Ticket # Info Title

User
1 something title1 me

If they click on 1 - they get the following
Ticket # Info Title User
1 something title1 me
response info description attachmennts
1 do this something screenshot1.jpg
2 do that more stuff none

All of the data is being pulled from a database. My problem with example i have seen use linkids to tie everything together, but this just wouldn't work i do not think, as there could be 1 link or there could be 200 links depending on the customer and number of tickets created.

I hope this makes sense to you all. here is my code for created the table for the tickets as of now...maybe someone sees an easy solution to this. thank you very much

$TicketsHTML .= '<td class="box_content_text"><strong>' . $Number . '</strong></td>';
$TicketsHTML .= '<td class="box_content_text"><strong>' . $Status . '</strong></td>';
$TicketsHTML .= '<td class="box_content_text"><strong>' . $Name . '</strong></td>';
$TicketsHTML .= '<td class="box_content_text"><strong>' . $Description . '</strong></td>';
$TicketsHTML .= '<td class="box_content_text"><strong>' . $Type . '</strong></td>';
$TicketsHTML .= '<td class="box_content_text"><strong>' . $Class . '</strong></td>';
$TicketsHTML .= '<td class="box_content_text"><strong><font size=1>' . $Contact . '</font></strong></td>';
$TicketsHTML .= "</tr>\n";

Thank you for any help in advance.

Th

If you want to expand the page to include the ticket details within the context of all of the other tickets (still as one or two lines) then you may want to look at using jquery and an accordion plug-in. There are multiple versions. I have provided a link to one of them below:
http://plugins.jquery.com/project/accordion

This page provides an accordion example:
http://jqueryui.com/demos/accordion/

Note: jquery makes using javascript much easier. You can embed this in your php program just as you would do with html. You'll have to assess your comfort / expertise level and decide if you want to go down that path. The simpler way is to just link to a new page where you show all of the details associated with a particular ticket.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.