Skip to main content
1-Visitor
May 24, 2017
Question

onclick javascript not getting called from action

  • May 24, 2017
  • 1 reply
  • 2200 views

I have a custom action defined on more part actions. I want to add an onclick handler to prevent my action getting called for Separable attribute value. I have javascript ready. when I place my custom javascript method in begin_custom.jspf its not getting called. could you please explain is there any step missing in the way that I am doing? 1. Defined onclick on custom-actions.xml 2. Created javascript method in \netmarkets\jsp\util\begin_custom.jspf

1 reply

15-Moonstone
May 29, 2017

To add a new javascript function, you should use a jsfrag file.

Extract from the customization guide :

To add any custom javascript to all the pages, you should create a new custom

jsfrag file. The file needs to be deployed in: codebase\netmarkets\

javascript\util\jsfrags

The file can be named custom.jsfrag or any other name that is not already in

use.

To include the file in all pages run the combine command. This will make the js

available in main.js: Windchill/bin>ant -f jsfrag_combine.xml