This topic is locked

Open a child link

7/4/2011 6:44:45 AM
PHPRunner General questions
J
jackaroo author

How do I create an 'OnLoad' event to display/open a particular child table when the list page loads?
I tried the following from the documentation without success:
--------------------------------------------------------------------------
// define table name of current list page:

var tableName = 'TableName';

var pageObj = Runner.pages.PageManager.getAt(tableName, pageid);
// get list of record IDs

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

var dTableName = 'DetailsTableName';

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

$("#"+sTableName+"_preview"+recsId[X]).click();
-----------------------------------------------------------------------------------
Is the 'inlineEdit' in the above correct? I want to 'list' the child records inline.
Thanks,

Jack

Sergey Kornilov admin 7/4/2011

Make sure you replace TableName and DetailsTableName with the actual table names.

J
jackaroo author 7/4/2011



Make sure you replace TableName and DetailsTableName with the actual table names.


I did but it didn't work. I also discovered that the presence of this code as an OnLoad event for the list page, spoiled the output of the OnLoad event code for the corresponding edit page.
When I changed the highlighted "inlineEdit" in you example code to "inlinePreview" (just a guess on my part), the output on the edit page went back to normal.
What is the "record number X"? is it 1,2,3,4....?
Thanks

Sergey Kornilov admin 7/5/2011

X takes values of 1 (first row), 2 (second row) etc.
If you need more help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.