Thanks, LiveQuery did it. (I'm a beginner :)) Peter
On Jul 14, 8:27 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm having a little problem, perhaps someone can help me figure this > > out because I'm a bit baffled. > > > In short: a link is clicked, I call a page with jquery ajax (the href > > of the link is not followed). The page returns taconite xml, so far so > > good. But then if I click the link that was changed by taconite, it > > follows the link and I see the XML in my browser. > > > The link code: > > > <span id="helpfullink127"><a href="/app/api/funnyhelpful.add.php? > > objecttype=8&objectid=127&funnyhelpful=2" > > class="funnyhelpful">helpful</a></span> > > > The javascript that calls the ajax: > > > $(".funnyhelpful").click(function(){ // upon click, make an ajax call > > to the href url > > var apiurl = this.href; > > $.ajax({ > > type: "GET", > > url: apiurl > > }); > > return false; // don't follow the href url of the link > > though. > > }); > > > The XML that is returned (this all works fine): > > > <taconite> > > <replace select="#funnylink$objectid"> > > funny (<a > > href='/app/api/funnyhelpful.remove.php? > > objecttype=8&objectid=$objectid&funnyhelpful=1' > > class='funnyhelpful'>x</a>) > > </replace> > > <replace select="#funnyamount$objectid"> > > $total > > </replace> > > </taconite> > > > Now the problem is: if I click this new link that is created (the "x" > > link), it doesn't do the same thing again, instead it shows the XML in > > my browser. > > > Any thoughts? I am thinking perhaps html that's inserted by taconite > > doesn't work the same as the html of the initial page? Any insights > > welcome! > > The new link does not have a handler bound to it. You can bind the > new link using Taconite by including script to do so, or you could use > the LiveQuery plugin to handle this automatically. > > Mike