-
G Belgrado
- Veteran Member
- Posts: 61
- Joined: 2017-03-12 09:24
Post
by G Belgrado » 2019-05-21 17:31
batch actions
javascript is perfect with Firefox but does not work with Chrome
Code: Select all
function eseguito(table_name, ids){
var url = 'eseguito.php?table=' + table_name;
for(var i = 0; i < ids.length; i++){
url = url + '&'
+ encodeURI('ids[]') + '='
+ encodeURIComponent(ids[i]);
}
myWindow = window.open(url, "myWindow", "width=1,height=1");
myWindow.close(); // Closes the new window
location.reload(false)
}
is the guilty
window.open ??
-
G Belgrado
- Veteran Member
- Posts: 61
- Joined: 2017-03-12 09:24
Post
by G Belgrado » 2019-05-22 16:11
I found the solution here
viewtopic.php?t=2761#p8613
window.open () was not needed
and with
Code: Select all
function eseguito(table_name, ids){
var url = 'eseguito.php?table=' + table_name;
for(var i = 0; i < ids.length; i++){
url = url + '&'
+ encodeURI('ids[]') + '='
+ encodeURIComponent(ids[i]);
}
$j.ajax({
url: url,
success: function(data){
}
})
location.reload();
}
It's work
-
G Belgrado
- Veteran Member
- Posts: 61
- Joined: 2017-03-12 09:24
Post
by G Belgrado » 2019-05-22 16:32
but not work on firefox
is there a way to start a js depending on the browser detected?
-
G Belgrado
- Veteran Member
- Posts: 61
- Joined: 2017-03-12 09:24
Post
by G Belgrado » 2019-05-23 16:47
now I have solved
but in another application generated with appgini 5.70
javascript with window.open and .close also works on Chrome.
with appgini 5.75 instead it does not work