The code that you are trying to apply it is blocked by the JavaScript that we use as this can cause XSS attacks. On the other side, you can use the JavaScript callbacks that we have here: unsetAutoloadJavaScript | Grocery CRUD
Please keep in mind that if you upgrade to the latest Grocery CRUD Enterprise, you can also use the RedirectResponse class as per documentation here: Full Page Redirection | Grocery CRUD
To perform a full page reload in GroceryCRUD Enterprise Version 2.7.9, you can use the following code:
phpCopy code
redirect(current_url(), 'refresh');
This code will redirect the current URL to itself with the ‘refresh’ parameter, which will reload the page. The current_url() function is a helper function provided by CodeIgniter, which returns the current URL.
Here is an example of how you can use this code:
phpCopy code
public function my_function()
{
// Some code here...
redirect(current_url(), 'refresh');
}
You can also use the header() function to perform a full page reload, like this:
phpCopy code
header("Location: " . current_url());
This will redirect the current URL to itself using the Location header, which will cause the browser to reload the page.
I hope this helps! Let me know if you have any further questions.