Hi Daniel,
If you want user to stay on the same page, probably you want to send
an Ajax request
onclick="new Request({ url: 'uri_of_php_file.php'}).post();"
This is very simplified (you won't know if request succeeded, or what
is the response), more info:
http://mootools.net/docs/core/Request/Request
Just keep in mind that the user has to be logged in the backend and
have appropriate priviledges, or ACL will block the action.
Peter
On May 9, 10:13 pm, Daniel <
daniel.iguera...@gmail.com> wrote:
> Hi all,
>
> I create a new component and I need to include a JS function in a HTLM
> code to execute a php file....
>
> I suppose that I must write it this way :
>
> _*HTML*_ : <input type="button" value="<?php echo JTEXT::_('NEXT'); ?>"
> onclick="/name_of_my_js_function()/;
> set_spans_show('sp_number3','','sp_number4','next');" >
>
> _*JS*_ : function /name_of_my_js_function ()/
> {
> ????
>
> }
>
> _*php*_ : my_file.php