Hi,
I developped an alumni members application with APPGINI.
I coded a first SMS batch action which runs successfully and I coded a second EMAIL batch action for selected members but the second one can't execute associated javascript function.
Any help will be appreciated.
Here is my coding :
In my table batch hook :
function membres_batch_actions(&$args) {
return array(
array(
'title' => 'Envoi Textos',
'function' => 'text_contacts',
'icon' => 'th-list'
),
array(
'title' => 'Envoi Courriels',
'function' => 'courriel_contacts',
'icon' => 'envelope'
)
);
}
In my javascript file :
function text_contacts(table_name, ids){
/*
we'll open the mail labels page in a new window
that page is a server-side PHP script named mail-labels.php
but first, let's prepare the parameters to send to that script
*/
var url = '/alls-alumni/hooks/text-contacts.php?table=' + table_name;
for(var i = 0; i < ids.length; i++){
url = url + '&'
+ encodeURI('ids[]') + '='
+ encodeURIComponent(ids);
}
alert("URL : " + url);
// window.open(url);
}
execution two batch actions
Re: execution two batch actions
Where is your function courriel_contacts?
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: execution two batch actions
Thanks for your response.
My function "courriel_contacts" is under my function 'text_contacts" in the same javascript file "membres-tv.js"
Here is it :
function text_contacts(table_name, ids){
/*
we'll open the mail labels page in a new window
that page is a server-side PHP script named mail-labels.php
but first, let's prepare the parameters to send to that script
*/
var url = '/alls-alumni/hooks/text-contacts.php?table=' + table_name;
for(var i = 0; i < ids.length; i++){
url = url + '&'
+ encodeURI('ids[]') + '='
+ encodeURIComponent(ids);
}
alert("URL : " + url);
// window.open(url);
}
function courriel_contacts(table_name, ids){
/*
we'll open the mail labels page in a new window
that page is a server-side PHP script named mail-labels.php
but first, let's prepare the parameters to send to that script
*/
var url = '/alls-alumni/hooks/courriel-contacts.php?table=' + table_name;
for(var i = 0; i < ids.length; i++){
url = url + '&'
+ encodeURI('ids[]') + '='
+ encodeURIComponent(ids);
}
alert("URL : " + url);
// window.open(url);
}
My function "courriel_contacts" is under my function 'text_contacts" in the same javascript file "membres-tv.js"
Here is it :
function text_contacts(table_name, ids){
/*
we'll open the mail labels page in a new window
that page is a server-side PHP script named mail-labels.php
but first, let's prepare the parameters to send to that script
*/
var url = '/alls-alumni/hooks/text-contacts.php?table=' + table_name;
for(var i = 0; i < ids.length; i++){
url = url + '&'
+ encodeURI('ids[]') + '='
+ encodeURIComponent(ids);
}
alert("URL : " + url);
// window.open(url);
}
function courriel_contacts(table_name, ids){
/*
we'll open the mail labels page in a new window
that page is a server-side PHP script named mail-labels.php
but first, let's prepare the parameters to send to that script
*/
var url = '/alls-alumni/hooks/courriel-contacts.php?table=' + table_name;
for(var i = 0; i < ids.length; i++){
url = url + '&'
+ encodeURI('ids[]') + '='
+ encodeURIComponent(ids);
}
alert("URL : " + url);
// window.open(url);
}
Re: execution two batch actions
Sorry, I did not see it in your first post.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: execution two batch actions
Hi,
I found the solution after seeing that any changes done to my javasript file "membres-tv.js were never applied.
I suppressed all the content of my navigator cashe and now it's OK.
André BARGE
I found the solution after seeing that any changes done to my javasript file "membres-tv.js were never applied.
I suppressed all the content of my navigator cashe and now it's OK.
André BARGE