[Project_owners] Getting document from dialog close onunload
brintoul at sbcglobal.net
Fri Feb 25 17:08:18 EST 2005
Bradley Rintoul wrote:
> After a dialog box is closed, I'm trying to take a pref set by the
> dialog and change a toolbar's textbox background color accordingly. I
> have a function set as a handler for the "onunload" event, but I can't
> figure out how to get ahold of the toolbar's textbox...(the toolbar
> lives in the browser) I put document.getElementById in the onunload
> handler, but I think it's still referring to the dialog's DOM... How
> do I get ahold of the "browers" DOM document so that I can get the
> textbox in question...?
> B. Rintoul
> Project_owners mailing list
> Project_owners at mozdev.org
I figured out how to do this - thought I'd share it in case some don't
know how to do this kind of thing...
I did this:
var element = opener.document.getElementById( "textbox-id" );
and then called "setAttribute" for the style on the returned element...
More information about the Project_owners