Hello,
Can someone help me with the following code, it is inside my HTML view - there is a lot of code so I will just post the code I think is causing the problem. I am just getting the error "null" when I press Save Script.
- <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
- <thead>
- <tr>
- <th scope="col"><span style="color:#a9a9a9;font-size:8px;"><b>ITEM</b></th>
- <th scope="col"><span style="color:#a9a9a9;font-size:8px;"><b>DRAWING NO.</b></th>
- <th scope="col"><span style="color:#a9a9a9;font-size:8px;"><b>ISSUE NO.</b></th>
- <th scope="col"><span style="color:#a9a9a9;font-size:8px;"><b>DESCRIPTION</b></th>
- <th scope="col"><span style="color:#a9a9a9;font-size:8px;"><b>QUANTITY</b></th>
- <th scope="col"><span style="color:#a9a9a9;font-size:8px;"><b>UNIT PRICE</b></th>
- </tr>
- </thead>
- <tbody align="center">
- <%for each DRW in Quote.Add_drawings_to_quote
- {%>
- <tr>
- <td><%=Item%></td>
- <td><%=DRW.Drawing_no%></td>
- <td><%=DRW.Issue_no%></td>
- <td><%=DRW.Description%></td>
- <td><%=DRW.Quantity%></td>
- <td>£<%=DRW.Quote_price%></td>
- </tr>
- <%if (DRW.Notes == "")
- {
- Item = (Item + 1);
- }
- else
- {%>
- <tr><td><%=Quote.Notes%></td></tr>
- <%}
- }%>
- </tbody>
- </table>
Basically I want to check if the variable
DRW.Notes has anything stored in it, and if it does I want to add a row to my HTML table and show the contents, if it doesn't have anything on it carry on with the "For loop"
I hope this makes some sense - please ask if you need more information.
Many thanks
Ben