On 7 Lug, 16:11, Jacques van der Merwe <[email protected]> wrote: > greetings all, > > i'm looking for some advice regarding using ajax to call a function, > from a view within the same controller. so for example, i'm in the > view /app/controller/view1, and from the view 'view1' i would like to > call another function/view from within 'view1' without leaving > 'view1'. i hope this makes sense. :)
This can be done but does not solve your problem below because.... > to explain the scenario in a little more detail. when i access > 'view1', i instantiate an object which is an SSH client. this object > needs to be available to all the functions within the controller, in > order to maintain it's state (an active SSH session). This cannot be done. In a production environment the web server starts and stops processes and threads at will. You cannot preserve the state of an SSH connection. You need a separate process running in background that does this and communicates with the app somehow, perhaps via xmlrpc. > i would like to > do this without leaving the view i arrived on 'view1', and update that > same view based on results/states of that object. i'm hoping that ajax > can help out with this. > > thanks for reading!

