This is a message.

Forum user: Jerame

Basic information

Registered Jun 16, 2009
Last login Aug 25, 2009
Forum posts 4
Direct URL http://www.flowplayer.org/forum/users/11875

Latest forum posts

Posts:

Registered:

» » » » Re-bind overlay bindings after AJAX call

Posted: Aug 25, 2009

I gave up and went back to ThickBox. I had to deliver the project and never found anything that would work how I wanted.

Let me know if you find something.

Posts:

Registered:

» Overlay link loaded inside

Posted: Jun 17, 2009

Have you tried updating the overlay with an AJAX call? You can use the JQuery selector like this:


function update(link) {

$("#data").load("/link/to/file.html");

}

Then you can pass the URL to the function when you call it. You can use the onclick attribute to call the update() function like so:


<div id="data">
<p>Your original HTML</p>
<a href="#" onclick="update();">link text</a>
</div>

You may have to do some tweaking, but the general idea should work. You could also try setting up your function generically and passing the URL when you call the function.

I haven't tried this specifically, so let me know if you try it and whether it works.

Posts:

Registered:

» » Re-bind overlay bindings after AJAX call

Posted: Jun 17, 2009

I tried everything I could imagine to get this to work. I noticed that JQuery added a new way to bind, called live that supposedly does dynamic binding with AJAX elements.

Maybe an update to tools using this binding technique would get rid of the need to re-init the bindings.

Otherwise, we at least need a reload function because I can't get this to work.

Posts:

Registered:

Re-bind overlay bindings after AJAX call

Posted: Jun 16, 2009

I am trying to use overlays in conjunction with an AJAX update to a page.

I have a JQuery UI calendar and it updates a #data div using $("#data").load(); function. Overlays work fine on the initial page load, but will not work after the #data div is updated via the AJAX call.

Tabs has a reload() method, but overlays does not. Anyone have an idea as to the best way to get this to work?

I was using Thickbox previously, and all I had to do was 1) flush the bindings and 2) call tb_init() in my AJAX .load() callback.

How can I re-init overlays after each AJAX call? Or should I be doing this another way?