Don't reload/refresh the page after 'php' plugin button on list is clicked

ashishrij

New Member
I have a 'PHP' plugin on one of the lists.

The scenario is - I select a few rows and run the 'PHP' plugin. On the PHP plugin, I have some PHP code, apart from that I also have some js code which in turn opens a popup where the user does some 'lengthy tasks'.

While all of this is happening the page refreshes and gives a message of 'code run'.

I don't want the page to refresh.


I want to refresh the page once the 'lengthy task' in that popup window is completed, which I can believe I can do using js at some point somewhere, it won't be an issue.

At this point, all I want is the page to not refresh when the user clicks on the button on the row on 'PHP plugin 'on the list and shows the message 'code run'.
 
I can't replicate.
The JS code (e.g. alert('somthing'); ) is run before the list is reloaded and the success message displayed.
 
Yes, you are right. The js code runs before and the list is reloaded.

I will try to explain the scenario in a bit detail so that it makes sense what and why I am trying to achieve this.

So I have a list where users can select multiple rows and use the press 'PHP' plugin button.

What the php plugin does on the backend is

- Store the id of selected rows in a session variable on the 'PHP code' of the plugin
- on the 'js code' section of the plugin, I open a 'form' in the new pop window, see the js code below
var referencepoint=window.open("index.phpoption=com_fabrik&view=form&formid=113","popup","resiza ble=1,width=600,height=450,chrome=1,centerscreen=1,toolbar=0");

on this 'form 113' i take that 'ids' stored in a session variable and do some 'crazy stuff'.

While all this is happening, the main window refreshes on the background, and all the 'ticked' rows become 'unticked' and the user gets confused.

I want the main window on the background to refresh - yes but only once this 'crazy stuff' is completed as this 'crazy stuff' changes some value in the list and i want it to be reflected on the page without the user manually refreshing the page.

Hope it makes a bit sense.

Again, much appreciated for the help.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top