This topic is locked

onmouseover event for "View as" custom code

10/16/2011 6:50:52 PM
PHPRunner General questions
L
laonian author

[size="4"]I have a project with one master and multiple detail tables using the same field to link. I want to use one field in the master table for the detail table preview popup and click-able link. I could make the link work but not the popup preview. I know I am stuck at the recId part. This is my code (master table list page-view as --custom)[/size]
[size="3"]



$masterquery="mastertable=mymastertable";

$masterquery.="&masterkey1=".$data["linkfield"];



$value="<A href=\"".$data["fieldA"]."_list.php?".$masterquery."\" id=\"master_".$data["fieldA"]."_".$_SESSION["recId"]."\" > ".$value." </A>";

[/size]
[size="4"]Note: One of the detail tables' name =$data["fieldA"]. I could not figure out the recId variable in PHP and how to call it with the custom code in list page. Please help me. Thanks.[/size]

C
cgphp 10/17/2011

It's not very clear what you want to do.

L
laonian author 10/17/2011



It's not very clear what you want to do.



[size="4"]

What I wanted to do is to mimic the master-detail preview attrs found in the generated listpage.php

//detail tables

$record[$dShortTable."_dtable_link"]=($this->permis[$dDataSourceTable]['add'] || $this->permis[$dDataSourceTable]['search']);

$record[$dShortTable."_dtablelink_attrs"]= "href=\"".$dShortTable."_list.php?".$masterquery."\" id=\"master_".$dShortTable."_".$this->recId."\"";


Using this code correctly for any field of a master table in the list page (visual editor-view as-custom) will give you the same result as the master-detail link created by the PHPr program. My problem is in my custom code, I don't know how to mimic
id=\"master".$dShortTable."".$this->recId."\"
Especially the [/size][size="4"]$this->recId[/size][size="4"] part. [/size]