Page 1 of 2
Radio Button doesn't respond to event listeners
Posted: Tue Jul 16, 2013 6:54 pm
by Kapow36
For some reason, I can't get radio buttons to respond to any event except change value. It does work fine in simulator, but on the phone, it doesn't respond. Also, the value change is on the button itself and not on the radio group which really makes it unusable. Any ideas why it won't work?
Radio Button doesn't respond to event listeners
Posted: Tue Jul 16, 2013 8:47 pm
by Kateryna Grynko
Hi,
For the whole radiogroup add Value Change event.
In JS handler you can access selected item value usingcodearguments[0].target.value./code
Radio Button doesn't respond to event listeners
Posted: Tue Jul 16, 2013 8:57 pm
by Kapow36
Thanks, works great. The reason the group value change wasn't working was because I was using a javascipt alert.
Radio Button doesn't respond to event listeners
Posted: Wed Jul 17, 2013 12:44 am
by Kapow36
Katya, it seems as though the events get removed when I add a radio group to a grid that I map a REST service to. Any ideas as to why this happens?
Radio Button doesn't respond to event listeners
Posted: Wed Jul 17, 2013 8:16 am
by Maryna Brodina
Hello! Not sure I understand what you mean. Could you provide more details? Any steps to reproduce?
Radio Button doesn't respond to event listeners
Posted: Wed Jul 17, 2013 2:35 pm
by Kapow36
I'm making a list of items the admin needs to approve or delete. Each item has an approve/delete radio buttons. Now, when I put a radio group on the page by itself, it works fine, but once I use it in the REST service mapping feature (making copies of it) it doesn't work.
Radio Button doesn't respond to event listeners
Posted: Wed Jul 17, 2013 5:18 pm
by Kateryna Grynko
Hi,
- Please show us screen shot of the mapping creates list.
- For which component do you use action?
- Usually we use checkboxes for such cases.
- List-to-delete is usually created from list before sending deletion confirmation. Sending separate request for each control involves overhead.
Radio Button doesn't respond to event listeners
Posted: Wed Jul 17, 2013 5:37 pm
by Kapow36
Here is the mapping image...

As you can see, the radio group is in the grid, there isn't actually anything mapped to the radio group.
Here is a screenshot of the app itself. The radio group only appends an ID to a string depending on which item is selected. (it is all handled when each radio button is clicked, not after)
image
Radio Button doesn't respond to event listeners
Posted: Wed Jul 17, 2013 5:42 pm
by Kapow36
Here is the mapping image...

As you can see, the radio group is in the grid, there isn't actually anything mapped to the radio group.
Here is a screenshot of the app itself. The radio group only appends an ID to a string depending on which item is selected. (it is all handled when each radio button is clicked, not after)
(name is fake)
Radio Button doesn't respond to event listeners
Posted: Thu Jul 18, 2013 11:10 am
by Maryna Brodina
Hello! When radio button is inside element which is cloning with a mapping - it changes name, that's why events don't work. Try the following JS on page Load:
code$('[name^="mobileradiogroupName"]').die().live({
change: function() {
//put your code here
},
});/code
where mobileradiogroupName - radio group name