Page 1 of 1

open detail view in new tab instead of replacing current?

Posted: 2019-12-30 00:54
by D Oliveira
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

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

Posted: 2020-01-01 16:03
by onoehring
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