views:

322

answers:

3

In my application I want to present a list of choices for a user to pick from in a modal popup. I'll be using the value they select in the 'parent' page.

I've looked into nyroModal, but none of the examples include a return value after the modal closes. I'm assuming this is because its opening up the content with a new HTTP request, which isn't going to lend itself well to returning a value.

Any suggestions for libraries / ways to get around this?

A: 

I would use ThickBox, and display Inline content as a modal dialog.

That way, you can query the inline elements (that will be hidden when the dialog is closed) for the data entered.

Jon
Trying this out, looking promising so far. How do you close the modal after the user has performed an action without them having to manually click close also?
Kirschstein
answer: call tb_remove();
Kirschstein
That's right. Alternatively, you could specify the dialog not to be Modal, and it would close if you click behind it.
Jon
+1  A: 

why not just use the jquery-ui dialog?

http://jqueryui.com/demos/dialog/

ErsatzRyan
A: 

we use JModal. It works well and does what you described.

ez