views:

171

answers:

1

I'm using Facebox for pretty facebook style popups and I was wondering if there is any way to use it with an update panel inside of it?

I have a div in a page with two drop downs, and the second drop down depends on the selected value of the first drop down. I put these dropdowns inside an UpdatePanel, and I would like to be able to show it as a popup with Facebox, but it doesn't work. It simply won't do anything.

Any ideas on how to make it work? Is it at all possible?

**note: there are several ways to use Facebox, what I'm doing right now is putting a div (display:none) on the page around what I want to show in the popup, and then hooking it up to a link using the facebox() method from the jquery extension.

A: 

What Facebox is doing is that it copies the innerHTML of your specified div into its own div to display out. This means that if you have an element of a specific ID, it will be duplicated and thus having 2 element of the same ID - pretty hairy.

Using Facebox with UpdatePanel would make things pretty much complicated. I would recommend that you have Javascript-controlled fields appearing in the Facebox and use the fields to manipulate with the actual UpdatePanel.

e.g. (in the facebox div, with no form):

<input type="button" onclick="submitUpdatePanel();" value="Submit" />
thephpdeveloper