This topic is locked
[SOLVED]

 Show details on list page for every records

8/21/2013 6:13:48 AM
PHPRunner General questions
F
Francesco_5000 author

Hi,
If I'm in a list page, and I click on the details table link, I see all the associated records:


I want to have all detail pages open for every records, and without any click... just after the load of the list page, is there a way to obtain this behaviour?

C
cgphp 8/21/2013

In the "Javascript onload" event you can trigger the click on every details link.

F
Francesco_5000 author 8/21/2013



In the "Javascript onload" event you can trigger the click on every details link.


Uhm... are you speaking about something like this:
http://xlinesoft.com/phprunner/docs/how_to_control_inline_add_edit_functionality_from_script.htm



// get list of record IDs

var recsId = pageObj.inlineEdit.getRecsId();
// get details table short table name

var dTableName = 'DetailsTableName';
var sTableName = Runner.pages.PageSettings.getShortTName(dTableName);
// click preview link of record number X

$("?mastertable="+sTableName+"&masterkey1="+recsId[X]).click();


?
Is DetailsTableName the name of the table as it is in the database?

C
cgphp 8/21/2013

Add the following code to the "Javascript onload" event:

$("a[id^='yourtablename_preview']").click();


If the details table name is test the code above will be

$("a[id^='test_preview']").click();
F
Francesco_5000 author 8/21/2013



Add the following code to the "Javascript onload" event:

$("a[id^='yourtablename_preview']").click();


If the details table name is test the code above will be

$("a[id^='test_preview']").click();



Very well Cristian, thanks for your kindness.