<br><br><br><div class="gmail_quote">On Mon, Mar 12, 2012 at 11:56 AM, Izz Abdullah <span dir="ltr"><<a href="mailto:Izz.Abdullah@hibbett.com">Izz.Abdullah@hibbett.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Ok, understood.  Short of buying a Mason book, I can rewrite some javascript to work out the print, but I am still not able to convert TicketObj->id to a string.  Can you assist there please?<br>
<div class="im HOEnZb"><br>
-----Original Message-----<br>
From: <a href="mailto:rt-users-bounces@lists.bestpractical.com">rt-users-bounces@lists.bestpractical.com</a> [mailto:<a href="mailto:rt-users-bounces@lists.bestpractical.com">rt-users-bounces@lists.bestpractical.com</a>] On Behalf Of Thomas Sibley<br>


</div><div class="im HOEnZb">Sent: Monday, March 12, 2012 10:39 AM<br>
To: <a href="mailto:rt-users@lists.bestpractical.com">rt-users@lists.bestpractical.com</a><br>
Subject: Re: [rt-users] TicketObj->Id to string for html<br>
<br>
</div><div class="HOEnZb"><div class="h5">On 03/12/2012 11:11 AM, Izz Abdullah wrote:<br>
> <a href="<a href="https://ourRT/Ticket/History.html?id=" target="_blank">https://ourRT/Ticket/History.html?id=</a>".$id<br>
> onClick="window.print();return false">Print Ticket Summary</a><br>
<br>
Mason isn't all Perl.  <a href="some string".$id makes no sense in Mason.  Refer to <a href="http://masonbook.com" target="_blank">http://masonbook.com</a><br>
<br>
<a href="<a href="https://ourRT/Ticket/History.html?id=" target="_blank">https://ourRT/Ticket/History.html?id=</a><% $id %>"<br>
onClick="window.print();return false">Print Ticket Summary</a><br>
<br>
> This is being displayed on the Display.html page.  I am simply wanting<br>
> to print, from the Display.html page, the corresponding History.html<br>
> page.<br>
<br>
Your onclick handler "window.print(); return false" is going to open the print dialog for the page it's on (i.e. Display.html).<br>
</div></div></blockquote></div><br><br clear="all"><div>As Tom pointed out below:<div><br></div><div>> <a href="<a href="https://ourrt/Ticket/History.html?id=" target="_blank">https://ourRT/Ticket/History.html?id=</a>".$id</div>

<div>Is invalid Mason. </div><div><br></div><div>When you want to add the value os one of your Perl variables to the output that you're generating [and that's really the whole point of Mason, isn't it? ],</div>

<div>you need to use the Mason Tag Syntax and set your access to Perl variables between a <% %> pair of tag symbols.  So, as Tom also pointed out,  your code above needs to look like this code:</div><div><br></div>
<div>
> <a href="<a href="https://ourrt/Ticket/History.html?id=" target="_blank">https://ourRT/Ticket/History.html?id=</a><% $id %>"</div><div><br></div><div>As for buying the book, there is a "read it online" link in the box on the right side, which will take you to an online HTML version of the book that you can use for reference at  <a href="http://masonbook.com/book/">http://masonbook.com/book/</a> </div>

<div><br>Len.</div></div><div><br></div><div><br></div>-- <br><a href="mailto:lenjaffe@jaffesystems.com" target="_blank">lenjaffe@jaffesystems.com</a>   614-404-4214<br>Proprietor: <a href="http://www.theycomewithcheese.com/" target="_blank">http://www.theycomewithcheese.com/</a> - An Homage to Fromage<div>

Grubmaster: <a href="http://www.greenbartraining.org/" target="_blank">Greenbar</a> 2011, 2010, 2009, Grub Asst. 2008, Trained 2007.</div><br>