Php pop up window updating parent

02-Jun-2017 04:14 by 3 Comments

Php pop up window updating parent - Chat israel sexy

The Javascript is more complicated because we are doing our best to alert the user if something went wrong (ie.the parent window was closed and the communication chain was no longer valid).

For deleting items you need to include a delete command column.

There are, of course, two pages: the pop-up and the primary.

The pop-up needs a way to pass data back to the primary page. The easiest way to accomplish this chain of communication is to pass the name of a Javascript call back method to the pop-up window.

The only slip up would be if there were two places on a screen that could handle the call back (with two different purposes).

In that case, maybe there could be an override that could be used. You could use something like "Form.serialize(obj Form)" to serialize all the form values. There is one I've used called Lightwindow (based on Prototype and Scriptaculous): or the j Query equivalent:

The page just launches the pop-up and sends, as part of the query string, the textual name of the call back method. Notice that the call back method, Pop Up Handler(), doesn't know anything about the pop-up or where the data is coming from - it just knows that if it gets data to add it to the form field.

Now, let's take a look at the pop-up window: Again, not a ton of stuff going on.

That way you code your page like it would any other page but it's loaded in the lightwindow like anything else.

In your use case, the contents of the lightwindog page will to go back to the server without knowing anything about the fact that it is in a sub window.

Also, note that we are actually storing the name of the call back method in the form field.

If this page was a fairly complex page with search capabilities and pagination, the page might refresh.

In that case, we might lose the call back method name.