Reinitialise Floatbox

Page: 1

Author Post
Member
Registered: Oct 2009
Posts: 35
I have a problem and I don't quite know what to search for to help me.

I have a table on a page, I click a link and open a floatbox window where I enter information. The page submits the form, inserts into an SQL table, and then inserts the row at the end of the table, all without a page refresh. The last cell in the table has a floatbox link. This link does not work, as I have injected the row into the DOM and need to somehow make floatbox see it.... to reinitialise.

Does this make sense? I would show but its an intranet. Any clever ideas?

Cheers,

Steve
Member
Registered: Oct 2009
Posts: 35
And yet again I solve my problem before you get a chance to :)

parent.fb.tagAnchors(parent.document);

I ended up searching the forum for DOM, found a lot of stuff not relevant, but one post that was almost identical.

Is this still the best way?

Steve
Administrator
Registered: Aug 2008
Posts: 3382
Good man!

fb.tagAnchors is an old legacy function that has been updated with fb.activate. The best resource for information about working with dynamically added floatbox links is found in the "Dynamically loading floatbox content via AJAX, script or UpdatePanel" section of the Instructions, and the fb.activate entry in the API Reference.
Member
Registered: Oct 2009
Posts: 35
I knew there was a better way :) I will re-read that section and implement it.

Cheers,

Steve

Page: 1