List php plugin and js plugin with the same button

kouros91

Member
Hi. Is it possible to run a php routine and then, a JS code , with the same raw button with the php list plugin or js list plugin ?

My php code alone works , but when i try to put a js code in js part in the php plugin, it doesn't work.
My js code is a url to another list:

var varurl = ids[0];
window.open('index.php/liste-totale/details/24/'+varurl,"_self");

Thank you.
Nicolas
 
Last edited:
Not built in, no. In the PHP plugin, the JS runs before the plugin submits the request to the server to run the PHP part.

You could roll your own in the JS plugin, by using the "user AJAX" method. See ./components/com_fabrik/user_ajax_example.php. Kick off an AJAX call to the server to run your PHP, and do your window.open in the 'onSuccess' callback of the AJAX call, which gets run when the AJAX is complete and the server has returned a response.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top