Skip to main content

Processing Ticket Orders

Now, let's return to the ShowTimes page and add the generated description: ticketssample.gif button.

First, we add an additional cell to our table (with the <td> tag) and place our Tickets.gif image in it (using an <img> tag).

—ShowTimes.csp—
ShowTimes.csp
<html> <body>
<csp:class encoded=1 super="%CSP.Page,Cinema.Utils">
<csp:query 
        name="Times" classname="Cinema.Show" 
        queryname="ShowTimes"
        P1='#(%request.Data("FilmID",1))#'>

<csp:object 
        name="Film" 
        classname="Cinema.Film" 
        objid='#(%request.Data("FilmID",1))#'>

<font><b>Today's Show Times for #(Film.Title)#</b></font>

<table cellpadding=5> <tr> ... </tr>
<csp:while condition="Times.Next()">
    <tr>
    <td>#(Times.Get("StartTime"))#</td>
    <td>#(Times.Get("TheaterName"))#</td>
    <td align="center">
    <img src="Tickets.gif" width="130" height="39" border="0" 
    alt="Click to order tickets for this show">
    </td>
    </tr>
</csp:while>
</table>
</body> </html>

Click generated description: handson.gif for the location of Tickets.gif and instructions on where to place the file so that ShowTimes.csp displays it.

FeedbackOpens in a new tab