cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

accessing the replaced element from an embedded xui dialog on windowload

jsulak
1-Newbie

accessing the replaced element from an embedded xui dialog on windowload

Hello Adepters,

I've created an embedded xui dialog box that's a simple dropdown menu, and its purpose is to let the user set an attribute value on the replaced element.

When the dialog box is loaded, I want the dropdown to display the current value of the attribute. But I can't figure out how to access the replaced element from inside the WindowLoad event handler. I can access it from the domactivate event by using:

Application.event.view.window.ownerNode

But Application.event.view is undefined when I try to do that from the WindowLoad event.

Any pointers? This seems like it should be easy to do.

Thanks,

-James

3 REPLIES 3
tfu1
1-Newbie
(To:jsulak)

Hi James,

Try Application.event.target.ownerNode.

In a WindowLoad handler, the Application.event.target is the window.

Tung

jsulak
1-Newbie
(To:jsulak)

Thanks, Tung. That's exactly what I was looking for.

-James

Hi James--

Yes, you have to use a different approach to get the window handles
inside windowload as opposed to domactivate.

To get the dialog document (the XUI document underlying the dialog) in
windowload, I have to use this:

dlgdoc = Application.event.target.dialogView.document

So, it might work for you to do something along these lines:

docnode = Application.event.target.dialogView.window.ownerNode

HTH

--Clay
Top Tags