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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Invoke javascript function after wizard step is displayed

akosolapov-2
14-Alexandrite

Invoke javascript function after wizard step is displayed

Hi.

I need to invoke javascript funtion after "defineItemAttributesWizStep" is displayed.

The purpose is to set number field "readOnly=true".

How can i do it?

Action attribute "beforeJS" does not help because field is null at that time.

Thanks.

2 REPLIES 2

Aleksandr Kosolapov wrote:

Hi.

I need to invoke javascript funtion after "defineItemAttributesWizStep" is displayed.

The purpose is to set number field "readOnly=true".

How can i do it?

Action attribute "beforeJS" does not help because field is null at that time.

Thanks.

I have done something similar for new part creation by adding this to the end of codebase/netmarkets/jsp/part/createPartWizard.jspf:

<script>

//Run functions after the attribute table has been loaded.

PTC.wizard

        .on(

                "afterLoadAttributeTable",

                function() {

                    //alert("Here at afterLoadAttributeTable");

                    //Needs a delay here because the "afterLoadAttribueTable" isn't really

                    //after the table has finished loading in the browser.

                    setTimeout(

                          function()

                          {

                              someJavaScriptFunctionHere();

                          }, 50);

                });

</script>

KD
12-Amethyst
12-Amethyst
(To:akosolapov-2)

Hi,

As per your requirement, if you only want to make number as read only you can achieve the same by changing the constraint in OIR, provided the object is supported to have OIR.

Find below the link for more details regarding OIR

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS172537

another link from Help Center which detailed different constraints and their effect on UI.

http://www.ptc.com/cs/help/windchill_hc/wc110_hc/index.jspx?id=WCCG_UICust_PresentInfoUI_AttributeHandle&action=show

Best Regards,

Kaushik

Announcements

Top Tags