views:

2762

answers:

2

Is there a way to update information in a div of a parent page from a pop-up/"lightbox" window. I would like to create a pop up window that contains a form that updates a database (currently i am using php/mysql with prototype).

In other words... I would like a user to be able to use a form in a popup window to update the database, and the changes that are made to be shown on the parent page without that parent page being refreshed.

Thanks.

A: 

Erh.. Are you sure you know what you're doing here?

Your 'modal' popup has never left the 'parent' page. Therefore, you can just update any DIV from the form request you know the ID of, close the lightbox, and vwalla.

I'm a mootools guy myself, but since prototype is kinda the same i'm guessing it's something like this:

<form onsubmit="$(this).send({update: 'yourParentDiv', onComplete: function() { lightBox.close() } })">
SchizoDuckie
A: 

111