it's any way to call http controller from js and also pass arguments?
Această întrebare a fost marcată
$.ajax({
url: "/your/controller",
data: data,
type: 'POST',
processData: false,
contentType: false,
success: function(result) {
//success code
}
});
Using type: 'POST' you can call http controller.
Hi,
Please Refer the following blog to understand how to call http controller from js
https://www.cybrosys.com/blog/how-to-call-controller-method-from-javascript
Regards
var ajax = require('web.ajax');
var def = ajax.jsonRpc("/controller/route", 'call', {
... # your controller method parameters
});
return $.when(def).then(function (vals) {
...
});
No this only call json controller not http controller. Already tired not working and thanks for reply :)
Îți place discuția? Nu doar citi, alătură-te!
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
Get host address or domain
Rezolvat
|
|
1
dec. 24
|
6355 | |
|
|
0
iun. 21
|
4293 | ||
|
|
2
mai 24
|
7109 | ||
|
|
2
iun. 22
|
6856 | ||
|
|
0
iun. 21
|
4297 |