List option link to open on a new tab

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
elio42
User
Posts: 128

List option link to open on a new tab

Post by elio42 »

Hi,

I add an icon in the listoptions to print an invoice by using a custom script (v11) using the script below .

$this->ListOptions->Items["imprimir"]->Body="/<a class=\"ewExportLink ewPrint\" title=\"Imprimir a Nota\" data-caption=\"Imprimir\" href=\"c_imprime_nota_locacao.php?ID_NL=" . $this->ID_NOTA_LOCACAO_MASTER->ViewValue . "\"><span data-phrase=\"Print\" class=\"icon-print ewIcon\" data-caption=\"Imprimir\"></span></a>";

The link is working well, however, I 'd like the link open in a new tab , but the attribute 'target' does not work. Please, what should I do ?


mobhar
User
Posts: 11761

Post by mobhar »

Try this:

$this->ListOptions->Items["imprimir"]->Body="/<a class=\"ewExportLink ewPrint\" title=\"Imprimir a Nota\" data-caption=\"Imprimir\" href=\"c_imprime_nota_locacao.php?ID_NL=" . $this->ID_NOTA_LOCACAO_MASTER->ViewValue . "\" target=\"_blank\"><span data-phrase=\"Print\" class=\"icon-print ewIcon\" data-caption=\"Imprimir\"></span></a>";


elio42
User
Posts: 128

Post by elio42 »

Thanks, Mobhar!
It works fine.
I had tried before use target clause but probably made ​​a mistake


Post Reply