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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

accessing the replaced element from an embedded xui dialog on windowload

jsulak
1-Visitor

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-Visitor
(To:jsulak)

Hi James,

Try Application.event.target.ownerNode.

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

Tung

jsulak
1-Visitor
(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
Announcements

Top Tags