Reloading widget with viaAjax()
My goal is to refresh a widget after a ajax call has been made.
Is it possible to (re)load a widget like this:
public function viaAJAX() {
}
If it is not possible: Is the best solution creating a new ajax request for it? Which doesnt have to be a problem at all, but I just want to prevent making more functions/calls as necessary.
Thanks in advance.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- PHPDevShell Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Tim
- Solved:
- 2013-07-26
- Last query:
- 2013-07-26
- Last reply:
Tim (timhagebols-3) said : | #1 |
I dove into the system code and it is not possible. Solving it with a new ajax request. Srry for the inconvenience.
Greg (gregfr) said : | #2 |
You have a perfectly valid point.
It should be possible to do what you want by encapsulating both replies (your ajax and the widget's) into a single request. But it's probably not worth it, because it's quite complicated, and with the adoption of spdy it would probably be useless.
You could also consider by-passing the widget way and implement your own single request passing back the parameters, and the corresponding action in JS. Being worth it depends on your situation.
greg