[SOLVED] error in "JS Code" list plug-ins

JBosir

Member
I upgraded to Github and me the following error happens now.
In list, plug-ins, php-file: xxx.php

Js Code:
Code:
confirm('?Seguro que deseas copiar las campa?as seleccionadas como nueva campa?a?')


When the button is pressed, get a popup with OK and Cancel.
Now it happens that Clicking Cancel executes the php file.

Thanks.

JS code - Any JavaScript code code entered here will be run when the plugin button is clicked (at the end of this plugin buttonAction() method).
If your code returns false, the button will not fire the request to run the PHP code.
 

Attachments

  • img.png
    img.png
    43.9 KB · Views: 197
I also upgraded to joomla 3.4.0. In a copy that I have with Joomla 3.3.0 without update fabrik, works perfectly.

In the copy with joomla 3.3 I updated fabrik, and it works. So I conclude that the error is to upgrade to joomla 3.4. Is it possible to solve this problem?
 
As the tooltip says, you need to return a value. Just calling confirm() doesn't return anything, the return value from confrim() just gets ignored. So do ...

Code:
return confirm('do something?');

It may have worked in the past, without explicitly using 'return', but we now wrap your code in a function(){} call before running it, so you need to explicitly use a return.

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

Thank you.

Members online

Back
Top