Hi Adam,

The only thing i have changed in the code from Dave's blog is that I
pull the data from a database instead of from a news feed.

So you can take a look at the code from the download in his blog,
there you will find some javascript function's that deal with
jTemplate. Then what I need to do is that when the data is loaded into
a table through a jTemplate then i need to add some click events. And
the snippet above should be the way to do it to prevent memory leaks.

Does that make a better understandig of what i want to do ?

On 18 Sep., 20:44, Adam Guichard <[EMAIL PROTECTED]> wrote:
> I'm new at this as well, but I might be able to provide you some
> assistance if you clarify your question a little.  What are you trying
> to accomplish?  What isn't working?  Do you have a link with an
> example of what's not working?
>
> After examining the snippet, this is my perception of what is
> happening.  You associate an event handler with all <a
> class='image'...> tags. When one of the anchors is clicked you load
> some html content found at the url specified by the link into a
> container with the id RSSTable .  After the content is loaded you
> drill through the dom and find any anchors of the form <a
> class='remote'> and attach this same event handler to them.
>
> None of the code you posted makes any calls to JTemplates functions.
>
> On Sep 18, 10:40 am, websam <[EMAIL PROTECTED]> wrote:
>
> > I have tested the use of jQuery, jTemplates and AJAX together with
> > asp.net shown in this blog :
>
> >http://encosia.com/2008/08/20/easily-build-powerful-client-side-ajax-...
>
> > And i got everything to work against my library of methods. However i
> > need to set some event handlers to the data i load through AJAX and i
> > can't get it to work. This is what I have tryed :
>
> > function addClickHandlers() {
> >     $("a.remote", this).click(function(e) {
> >         e.preventDefault;
> >         $("#RSSTable").load(this.href, addClickHandlers);
> >         alert('Testing event handler');
> >     });}
>
> > $(document).ready(addClickHandlers);
>
> > As I understand from the jQuery docs then I have to do it this way to
> > prevent memory leaks. Can someone point me in the right direction on
> > how to do this ?

Reply via email to