This topic is locked

How to disable master-detail hyperlink in list page

6/16/2010 5:43:54 AM
PHPRunner General questions
J
jack knowles author

Hi Forum,
I have created a table relationship as follow:
Master: quotes

Details: updates
Master page setting:

Display a number of child records

Hide details link if no child records exist
Display child records on:

List page .. in popup
I can see the link on the quotes list page.
I need a way to disable the link from redirecting, whilst still allowing the user to hover over the link and see the record details in the popup.
my code snippet in Visual editor reads as follows:
{BEGIN quotes_dtable_column}<TD class=borderbody vAlign=middle noWrap align=left>{BEGIN updates_dtable_link}<A

{$updates_dtablelink_attrs}>Updates Found:<SPAN {$updates_childnumber_attr}>{BEGIN updates_childcount}({$updates_childnumber}){END updates_childcount}</SPAN>

</A>&nbsp; {END updates_dtable_link}</TD>{END quotes_dtable_column}
Thanks in advance
JK

A
ann 6/16/2010

Hi,
proceed to the After record processed event on the Events tab. Here is a sample code:

$record["updates_dtablelink_attrs"] = "";
J
jack knowles author 6/16/2010

Hi Ann,
The code removes the hyperlink capabilities as requested but also removes the ability to view any child records as a popup.
I need a way to remove hyperlink and keep the popup function to view all user updates.
Please HELP
JK

A
ann 6/17/2010

Hi,
try this code:

$record["ChildTableName_dtablelink_attrs"]=" onmouseover=\"RollDetailsLink.showPopup(this,'ChildTableName_detailspreview.php'

+this.href.substr(this.href.indexOf('?')));\" onmouseout=\"RollDetailsLink.hidePopup();\"";


here is ChildTableName is actual child table name.