Ajax rendering

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ajax rendering

Ted Wrinch
Hi All,

I have a component on a webpage that uses Ajax to communicate with the Seaside server when its controls are used. I want to re-render the page when this happens. My problem is that the html parameter in the Ajax callback block is not usually that of the whole  page. Perhaps I could grab the whole page but I would still have the problem that Ajax DOM replacement expects you to provide a parent element to hang everything off of - in other words, you are required to design your HTML for Ajax. Is there anyway of getting the normal HTML canvas and rendering on that from an Ajax call? OTOH, perhaps this whole approach is wrong and I should do something like adding a hidden anchor and trigerering that (with JavaScript) from my control, which would use the normal Seaside rendering loop to refresh the page. What do people think?

Thanks,

T.

Ted Wrinch 

Ted Wrinch





_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Ajax rendering

Boris Popov, DeepCove Labs (SNN)

Ted,

 

Could this highlighted bit be what you’re looking for?

 

(html anchor)

onClick: ((html jQuery ajax)

                                                script:

                                                                [:s |

                                                                self session announce: RequestingLogout.

                                                                s refresh]);

                with: ‘Log out’

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Ted Wrinch
Sent: Wednesday, October 05, 2011 7:38 AM
To: Seaside discussion - general
Subject: [Seaside] Ajax rendering

 

Hi All,

 

I have a component on a webpage that uses Ajax to communicate with the Seaside server when its controls are used. I want to re-render the page when this happens. My problem is that the html parameter in the Ajax callback block is not usually that of the whole  page. Perhaps I could grab the whole page but I would still have the problem that Ajax DOM replacement expects you to provide a parent element to hang everything off of - in other words, you are required to design your HTML for Ajax. Is there anyway of getting the normal HTML canvas and rendering on that from an Ajax call? OTOH, perhaps this whole approach is wrong and I should do something like adding a hidden anchor and trigerering that (with JavaScript) from my control, which would use the normal Seaside rendering loop to refresh the page. What do people think?

 

Thanks,

 

T.

 

Ted Wrinch 

 

Ted Wrinch


 


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside