This topic is locked

Inline print

8/16/2010 7:13:14 AM
PHPRunner General questions
S
sickacid author

Hi, it's possible have an icon in the list page, for every line, like edit or watch,

with printer ?

A
ann 8/16/2010

Simone,
you'll need to Insert an additional column to the table on the Visual Editor tab, then add the image to the new column (HTML mode):

<TD><IMG src="URL" onclick="window.location.href='TableName_print.php'"></TD>
S
sickacid author 8/16/2010

i've put this code
{BEGIN listIcons_column}<TD class=listIcons vAlign=middle noWrap align=middle>{BEGIN inlineedit_column}{BEGIN inlineedit_link}<A class=tablelinks title="Modifica inline" {$inlineeditlink_attrs}><IMG

class=listIcon alt="Modifica inline" src="images/icon_inline_edit_new.gif"

align=middle border=0></A>{END inlineedit_link}{END inlineedit_column} {BEGIN view_column}{BEGIN view_link}<A class=tablelinks title=Guarda {$viewlink_attrs}><IMG class=listIcon

alt=Guarda src="images/icon_view_new.gif" align=middle border=0></A>{END view_link}{END view_column}

<IMG style="WIDTH: 24px; HEIGHT: 25px"

onclick="window.location.href='tabella_assenze_autisti_print.php'" height=27

src="images/printer_icon.jpg"

width=24></TD>{END listIcons_column}
But when i click on it, it print the first record in the table, and it don't point to the right record, only

at the first..

J
Jane 8/17/2010

Simone,
here is the correct code:

<A class=tablelinks title=Print {$printlink_attrs}><IMG src="URL" border=0></a>



Then assign correct parameters for thsi link in the List page: After record processed event on the Eventstab. Here is a sample:

$record["printlink_attrs"] = " href=\"TableName_print.php?recordid=".$data["KeyField"]."\" ";


To filter records on the print page use Print page: Before SQL query event:

if ($_REQUEST["recordid"])

$strWhereClause = whereAdd($strWhereClause,"KeyField=".$_REQUEST["recordid"]);