This topic is locked
[SOLVED]

Modifying url from tab created dynamicaly

1/13/2022 12:23:49 AM
PHPRunner General questions
P
Patrick leith author

Hy, i am trying to change the url that is created when i do a dynamic tab

he is the way i call my list

http://localhost:8086/phppos_sales_list.php?idclient=17689
i take the client id ad but it in a session variable

this is the code i use
in list page before process

.... more stuff before
$pageObject->addTab("phppos_categories.name = '".$TabDescription."' AND phppos_sales.customer_id=".$_SESSION['idglobal'],$TabCaption,$TabIdentity);
...ore stuff after

but the tab is created with http://localhost:8086/phppos_sales_list.php?tab=tab3&&page=list

and i need to be http://localhost:8086/phppos_sales_list.php?tab=tab3&&page=list&idclient=17689
so when i click the tab , it will pass back the idclient parameter

it make 5 days , i am trying and cant figure out how, (and i have a feeling that is a stupidity that i am missing)

thanks in advance

Sergey Kornilov admin 1/14/2022

You cannot change the URL of the tab. What you can do is to access that parameter in the URL when it is passed the first time, save it in the seession variable and then use that session variable in futher code.

P
Patrick leith author 1/14/2022

Thanks, can you provide a example of modify the url from the tab, that would be super apreciated

Again thanks in advance

Sergey Kornilov admin 1/15/2022

Again, you cannot modify the URL. You can read the parameter from the URL and save it in the session variable.

P
Patrick leith author 1/16/2022

Hi, i am not trying to change the url of the browser but the url created by the function
$pageObject->addTab("phppos_categories.name = '".$TabDescription."' AND phppos_sales.customer_id=".$_SESSION['idglobal'],$TabCaption,$TabIdentity);

because each tab created contain these parameters for example ?tab=tab1&&page=list ?tab=tab2&&page=list ?tab=tab3&&page=list for example
this is where i would like to add my parameter to the url of the dynamic tab
is this possible ?

does that make more sense ?

again thanks in advance