loading Div updated by Ajax

Page: 1

Author Post
lorman
Guest
Hi,

I am using XAJAX to perform an add to cart operation on my site. I am also using floatbox to display a summary of the updated cart that is loaded into a hidden div and I am using the loadAnchor function to display the div using the #divID as the href.

This works perfectly the 1st iteration, but if the button is clicked again... the update to the hidden DIV is not reflected in the information displayed in the floatbox and I have no idea how to make it update. Any advice?

Thanks

Eugene
Administrator
Registered: Aug 2008
Posts: 3382
Try this:
Immediately before your loadAnchor call, call
fb.tagAnchors(document.body);
or fb.tagAnchors(document.body || document.getElementsByTagName('body')[0]); if you want to be friendly to Safari 3.0.x on XP.

I bet that doesn't work. If it doesn't, add
fb.anchors.length = 0;
just before the fbTagAnchors call.
lorman
Guest
did as you said, using the length = 0 so it doesnt screw up any other FB's and it's working beautifully. BTW if someone want to have a FB that comes up for a time and then closes automatically they can use the Javascript setTimeout as in "setTimeout('fb.end()',3000);".

Thanks for the quick response.

Eugene

Page: 1