This topic is locked

Hover box made static on list page

7/1/2008 7:46:29 PM
PHPRunner General questions
jwoker author

I have a master / detail relationship setup and the details show up when i hover my pointer over the link to the details table on the Master list page. I would like to have the details show up in a static box on the Master list page without having to hover. Is this possible?
Peter

J
Jane 7/2/2008

Peter,
sure you can do it. But this task require some custom coding.

Here are some tips:

  1. edit SQL query for master table on the Edit SQL query tab:
    select field1,

    field2,

    masterkey,

    masterkey as detail_records,

    ...

    from TableName


2. check off detail_records field on the list page only on the Choose fields tab.

3. set up detail_records field as custom on the "View as" settings dialog on the Visual Editor tab.

Here is a sample code:

global $conn;

$str = "select * drom DetailTable where ForeignKey=".$value;

$rs = db_query($str,$conn);

while ($data = db_fetch_array($rs))

{

//print selected values here

}