Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Adding event listener using dojo on custom attribute in ccm

 Hello,


I am trying to add an event listener on a custom attribute in ccm using dojo. I came to know that we have WorkItemAttributes, but that restricts the user to only fetch internal/system attributes. Could you please help me on how can I attach an on change event handler to a radio button (enumeration) in CCM using dojo?

Regards,
Rohit Goyal

1

0 votes



One answer

Permanent link
Hi Rohit,
Try this.. on function to attach the event listener to the radio button element.

require(["dojo/query", "dojo/on", "dojo/domReady!"], function(query, on) {
  // Replace "radioButtonID" with the unique ID or class of your radio button element
  var radioButton = query("#radioButtonID")[0];

  // Attach the event listener to the radio button
  on(radioButton, "change", function() {
    // Access the selected value of the radio button
    var selectedValue = radioButton.value;

    // Perform your desired actions based on the selected value
    // For example, you can log the selected value to the console
    console.log("Selected value: " + selectedValue);
  });
});
I hope it help you.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Jul 17 '23, 12:45 a.m.

Question was seen: 697 times

Last updated: Jul 17 '23, 3:44 p.m.

Confirmation Cancel Confirm