Subject Re: [firebird-php] Pop-up's
Author Milan Babuskov
Lester Caine wrote:
> OK, I have a nice means of setting some entries in the
> database, created from another table in the database, so the
> customers can edit the list of available options. It is
> currently working as a separate page - hit button for
> selection you want, list of sub-options come up, select
> sub-option, return to first page with setting added.
>
> I don't want to do these as drop down lists on the first
> page, because of the number of options, and the need for
> alternate lists depending on other factors, but I would like
> to get the 'options' page to be a pop-up window on the first
> page. I've had a good scout round, but I'm not getting
> anywhere. Anybody got an idea where I should be looking.
>
> It's all intranet, so I do know how the browsers are set :)

You can do this with JavaScript (here's me again ;)
It works with IE and Mozilla, others might have issues.

Your base form must be inside one frame of the frameset (otherwise just
forget it). Let's say that frame is named: "rightFrame". Now, you can
open new pop-up window (either with JS window.open() function, or
clicking on link with TARGET=_blank). From that new window, you can
access all elements of the base document like this:

top.rightFrame.document.myForm.someElement.value = ...;

I haven't found any frameless solution, since there is not way to access
an unnamed base document. Actually there is one, but it's
unidirectional. If you create pop-up window with window.open() and give
it some name, you can access it from the base form, but now the other
way around. I found it a little awkward to explain the users that they
have to minimize pop-up and select some option from base form to load
data from popup window.

HTH

--
Milan Babuskov
http://fbexport.sourceforge.net