Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Radio Button doesn't respond to event listeners

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Radio Button doesn't respond to event listeners

Hi,

For the whole radiogroup add Value Change event.

In JS handler you can access selected item value usingcodearguments[0].target.value./code

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Radio Button doesn't respond to event listeners

Thanks, works great. The reason the group value change wasn't working was because I was using a javascipt alert.

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Radio Button doesn't respond to event listeners

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Radio Button doesn't respond to event listeners

Hello! Not sure I understand what you mean. Could you provide more details? Any steps to reproduce?

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Radio Button doesn't respond to event listeners

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Radio Button doesn't respond to event listeners

Hi,

  1. Please show us screen shot of the mapping creates list.
  2. For which component do you use action?
  3. Usually we use checkboxes for such cases.
  4. List-to-delete is usually created from list before sending deletion confirmation. Sending separate request for each control involves overhead.
Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Radio Button doesn't respond to event listeners

Here is the mapping image...

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

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Radio Button doesn't respond to event listeners

Here is the mapping image...

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
(name is fake)

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Radio Button doesn't respond to event listeners

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

Return to “Issues”