open detail view in new tab instead of replacing current?

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

open detail view in new tab instead of replacing current?

Post by D Oliveira » 2019-12-30 00:54

found this on datalist.php

Code: Select all

if($this->AllowSelection == 1 && $SelectedID != $row[$FieldCountTV]){
$rowTemp = str_replace('<%%SELECT%%>',"<a onclick=\"document.myform.SelectedField.value=this.parentNode.cellIndex; document.myform.SelectedID.value='" . addslashes($row[$FieldCountTV]) . "'; document.myform.submit(); return false;\" href=\"{$this->ScriptFileName}?SelectedID=" . html_attr($row[$FieldCountTV]) . "\" style=\"display: block; padding:0px;\">",$rowTemp);
$rowTemp = str_replace('<%%ENDSELECT%%>','</a>',$rowTemp);
then i added

Code: Select all

 . "\" target=\"_blank\" rel=\"noopener noreferrer" .
finally we got:

Code: Select all

$rowTemp = str_replace('<%%SELECT%%>',"<a onclick=\"document.myform.SelectedField.value=this.parentNode.cellIndex; document.myform.SelectedID.value='" . addslashes($row[$FieldCountTV]) . "'; document.myform.submit(); return false;\" href=\"{$this->ScriptFileName}?SelectedID=" . html_attr($row[$FieldCountTV]) . "\" target=\"_blank\" rel=\"noopener noreferrer" . "\" style=\"display: block; padding:0px;\">",$rowTemp);
$rowTemp = str_replace('<%%ENDSELECT%%>','</a>',$rowTemp);
but unfortunately it didnt work, any suggestions? thanks

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1163
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: open detail view in new tab instead of replacing current?

Post by onoehring » 2020-01-01 16:03

Hi D Oliviera,

what is the code you are getting in the generated page? Did you check that the code (target=...) is actually there?
Maybe you can post that generated line as well. Might help.

Olaf

Post Reply