'Is there a way to capture the information in this document loop and hide a table based on a specific word being present?

Is there a way to capture the information in this document loop and hide a table based on a specific word being present?

For context. My software is sort of a branded version of Shutterfly for marketing materials. Many of our products are downloadable only, but this page sends an email to the printshop with every order. If I were to tag the downloadable items, how would I capture this info, specifically "DocumentProperty:Description", so I can write a javascript function around it?

code below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Good Samaritan Society Storefront</title>
</head>

<body style="color: #000; font-family: Arial, Verdana, Helvetica;">
<style TYPE="text/css">
.doc_Rejected {color:white;display:none;}
.doc_Rejected td {color:white;display:none;}
</style>


<DocumentLoop>

   <table style="width:100%;" id="orderinfo">
      <tr>
        <td style="border-bottom: 1px solid black; border-collapse: collapse;width:50%;"></td>
        <td style="border-bottom: 1px solid black; border-collapse: collapse;width:50%;">Designer: <em>Storefront</em></td>
      </tr>
      <tr>
        <th style="background-color: #868686; text-transform: uppercase;" width="500px">Location</th>
        <th style="background-color: #868686; text-transform: uppercase;" width="500px">Job</th>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><strong><em><Shipping:ShippingAddress1><Shipping:ShippingAddress2>, <Shipping:ShippingCity>, <Shipping:ShippingState> <Shipping:ShippingPostalCode></em></strong></td>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><strong><em>Job #: <PrintingField:DocIDshort>  - <font color="red"><DocumentProperty:Status></em></strong></font></td>
      </tr>
      <tr>
        <td style="border-bottom: 1px solid black; border-collapse: collapse;"><strong><em>Location: <Shipping:ShippingCenter></em></strong></td>
       <td style="border-bottom: 1px solid black; border-collapse: collapse;">Description: <PrintingField:Category1><PrintingField:Category2><PrintingField:Category3><DocumentProperty:Description></td>
      </tr>
      <tr>
        <td style="border-bottom: 1px solid black; border-collapse: collapse;"><strong><em>Route Number: <Shipping:routenumber> | Accounting Code: <Payment:accountingcodes></em></strong></td>
        <th style="background-color: #868686; text-transform: uppercase;" width="500px">Printer</th>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">Contact Name: <User:UserProfileFirstName> <User:UserProfileLastName> | Contact Email: <User:UserProfileEmailAddress></td>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">Type of job: Storefront - <DocumentProperty:ProductName> <PrintingField:Category></td>
      </tr>
      <tr>
        <th style="background-color: #868686; text-transform: uppercase;" width="500px">dates</th>
        <td style="border-bottom: 1px solid black; border-collapse: collapse;">Printer: <PrintingField:WhoPrints></td>
      </tr>  
      <tr>
        <td style="border-bottom: 1px solid black; border-collapse: collapse;">Sent to printshop: <PrintingField:ReviewedOn></td>
        <th style="background-color: #868686; text-transform: uppercase;" width="500px">Quantities </th>
      </tr>  
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">Ship from NC:</td>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><strong><em>#Copies #Up</em></strong></td>
      </tr>  
      <tr>
        <th style="background-color: #868686; text-transform: uppercase;" width="500px">proof </th>
        <td style="border-bottom: 1px solid black; border-collapse: collapse;"><strong><em><DocumentProperty:Quantity> / <PrintingField:PrintShop4></em></strong></td>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">Proof with designer: No</td>
      <th style="background-color: #868686; text-transform: uppercase;" width="500px">ink & paper</th>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">Initial & date if okay to print: </td>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><strong><em><PrintingField:PrintShop6></em></strong></td>
      </tr>
      <tr>
      <th style="background-color: #868686; text-transform: uppercase;" width="500px">sample</th>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;" id="vn"><PrintingField:PrintShop7></td>
      </tr>  
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">1 copy to: Pink sheet</td>
      <td bgcolor="#CDCDCD">color:  White</td>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><PrintingField:PrintShop10><br/><PrintingField:PrintShop11><br/></td>
      <td bgcolor="#CDCDCD"><PrintingField:PrintShop1></td>
      </tr>
      <tr>
      <th style="background-color: #868686; text-transform: uppercase;" width="500px">Special Instructions</th>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">Paper-Other: </td>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><Payment:Comments><br/><br/><strong><PrintingField:PrintShop13></strong><br/><br/><Payment:SpecialBilling><Shipping:ShippingDeliveryMethodLabel><br/><br/><PrintingField:PrintShop9><br/><br/><PrintingField:PrintShop12></td>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">
      <table>
      <tbody>
      <tr>
      <th style="background-color: #868686; text-transform: uppercase;" width="500px">Print assembly</th>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><PrintingField:PrintShop5></td>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><PrintingField:PrintShop3a></td>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><PrintingField:PrintShop3></td>
      </tr>
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><PrintingField:PrintShop8></td>
      </tr>
     <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;"><PrintingField:PrintShop4></td>
      </tr>     
      </tbody>
      </table>
      <tr>
      <th style="background-color: #868686; text-transform: uppercase;" width="500px">Billing</th>
      </tr>
      <tr>
      <table>
      <tody>
      <tr>
      <td width="200px">Print:</td>
      <td width="200px">Mailing:</td>
      </tr>
      <tr>
      <td width="200px">Shipping: <Shipping:UPSCosts></td>
      <td width="200px">TOTAL:</td>
      </tr>  
      <tr>
      <td style="border-bottom: 1px solid black; border-collapse: collapse;">Job completed:</td>
      </tr></tr></td></tr></table></table>
    </body> 
    </table>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    

</DocumentLoop>





</BODY>
</HTML>

Much appreciated. Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source