<input type=“radio” returning ON with onclick function

541    Asked by asutos_8102 in Salesforce , Asked on Jul 12, 2021

To my previous Question, I did some more debugging and ended up log with OnClick value: on

Good thing is, I have my LightningApp on the Internet Explorer which helped to get to the console logs(Chrome browser getting me the correct log value).

Aura.cmp

... <input type="radio" aura:id="radioId" id="{!rType}" name="options" value="{!rType}" onclick="{!c.selectedRadio}">

Aura.Js

selectedRadio: function(component, event, helper){ var temp = event.target.value; component.set('v.selectedRecordType',temp); console.log('OnClick value: ' +temp); }

I am trying to set the value for selectedRecordType attribute, that way I can use it in other button which fires the force:recordCreate event. But I am ended up with the log: OnClick value: on

I have also tried using: event.getSource().getElement().value but I always gets an runtime error:

[Object doesn't support property or method 'getSource']

When I debug Lightning App via Google Chrome, on the console, I can see the selected radio button values as they get select. But why it is not working this way on Internet Explorer???? On IE, I can only get OnClick value: on each and every time, but what causing this to work on Chrome and not on IE???????


Answered by Ben PHILLIPS

This is exactly what happened in my Chrome browser. I can see the onclick value picked from the selected radio button onlick, but on IE, I cannot get it, thus Lightning for Outlook fails.



Your Answer

Interviews

Parent Categories