This topic is locked
[SOLVED]

 Adding Custom Link

10/13/2017 2:51:14 AM
PHPRunner General questions
F
fraka author

Hello guys.
I am new to PHPRunner, so far a great tool.

I have a challenge, I am trying to add a custom link, to include item-ID like below
[color="#0000FF"]{item_id} should be the specific item id in the list. Can someone help me on how to capture specific item ID and place it on the link.
Thanks guys.

F
fraka author 10/16/2017

Come-on Guys -- you mean no one knows how to solve the issue in this forum.

S
sthefaine 10/16/2017



Come-on Guys -- you mean no one knows how to solve the issue in this forum.


What version of PHPRunner are you using?
Here is one way on 9.8
Add a button to you list page in a column before the data.

Then in the OnServer Event add this :
$record = $button->getCurrentRecord();
$result['Link']='Mywebpage.php?'.$record['My_Id']); <--- Change My_Id to your key field or whatever field you need to capture here.
In OnClient After Event add :
I open mine in a popup but you can change this
var win = Runner.displayPopup( {

url: result["Link"],

width: document.documentElement.clientWidth-50,

height: document.documentElement.clientHeight-50,

header: result["Header"],

footer: '<center><a href="#" onclick="window.win.close();">Close window</a></center>',

afterCreate: function(win) {

window.win = win;

}

});
If you need another way I have that to.

Let me know Thanks Steve

Admin 10/16/2017

You need to use 'View as' type Custom:

https://xlinesoft.com/phprunner/docs/_view_as__settings_custom.htm
You can format any field as a hyperlink and include data from the current record as a parameter.

F
fraka author 10/16/2017



What version of PHPRunner are you using?
Here is one way on 9.8
Add a button to you list page in a column before the data.

Then in the OnServer Event add this :
$record = $button->getCurrentRecord();
$result['Link']='Mywebpage.php?'.$record['My_Id']); <--- Change My_Id to your key field or whatever field you need to capture here.
In OnClient After Event add :
I open mine in a popup but you can change this
var win = Runner.displayPopup( {

url: result["Link"],

width: document.documentElement.clientWidth-50,

height: document.documentElement.clientHeight-50,

header: result["Header"],

footer: '<center><a href="#" onclick="window.win.close();">Close window</a></center>',

afterCreate: function(win) {

window.win = win;

}

});
If you need another way I have that to.

Let me know Thanks Steve


Thanks a lot Steve - It worked for me. Thanks thanks again.
Please guys, the Guluz, to keep this forum active; reply to posts. Thanks again Steve, appreciated.