|
Posted by Jim Davis on 09/06/05 21:02
"Davey" <davey@hello.com> wrote in message news:431db922$1_2@x-privat.org...
> "Jim Davis" <newsmonkey@vboston.com> wrote in message
> news:dfkacg01p6r@news2.newsguy.com...
>> "Davey" <davey@hello.com> wrote in message
>> news:431da184$1_1@x-privat.org...
>> The "opener" property of the popup window is a reference to, well, the
>> opener. ;^) It links the window which opened the popup.
>
> What is the syntax for opening a popup which will allow "opener" to be
> accessed from the popup?
There isn't any - "opener" is a standard property - it's automatically
populated for any popup.
>> If you have a variable called "CurrentClass" in the main window you can
>> populate it from the popup like:
>
> By "variable" do you mean hidden form control?
Nope - any variable. If, on your main page, you did:
CurrentClass = "SomeStringILike";
You could change that value later from the popup by doing
window.opener.CurrentClass = "SomeNewStringILike";
(Actually you can probably just use "opener" without the "window" but I'm
not sure - I tend to be more specific than JavaScript requires.)
"opener" is just a reference to the window object of the main window (well -
the window that opened the popup) - you can do pretty much ANYTHING you
might do in the main window from the popup using it.
If you want to run a function form the main window you'd use
"opener.myFunction();" for example. If you wanted to see the title of the
opener you'd use "opener.document.title" and so forth. It's all there and
available.
Jim Davis
Navigation:
[Reply to this message]
|