Javascript to select radio button on database query not working after upgrade

This forum contains topics that were moved from Get Satisfaction
Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Javascript to select radio button on database query not working after upgrade

Post by Yurii Orishchuk »

Hi Daniel,

the culprit of your problem is link from text value to "visible" property..

This property requires boolean or JSON string.

To convert your text value to boolean you can use following code:

pre

return value ? true : false;

/pre

This will fix this problem.

Regards.

Daniel7157685
Posts: 0
Joined: Thu Oct 09, 2014 7:31 pm

Javascript to select radio button on database query not working after upgrade

Post by Daniel7157685 »

I've just mapped it to selected instead of to visible and it works with the modified code you gave me earlier. Before the upgrade it would only work when I had it mapped to visible for some reason. Glad I got it worked out and thank you very much for all of your help.

Just as a side note, the code I posted originally works as well now when mapped to selected instead of visible. Not sure which is better to use really.

Daniel7157685
Posts: 0
Joined: Thu Oct 09, 2014 7:31 pm

Javascript to select radio button on database query not working after upgrade

Post by Daniel7157685 »

One last request, I can't go back and remove the public link to my app from my earlier post. Is this something you can do for me?

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

Javascript to select radio button on database query not working after upgrade

Post by Kateryna Grynko »

Hi Daniel,

I deleted your post.

Woody
Posts: 0
Joined: Thu Dec 04, 2014 2:37 pm

Javascript to select radio button on database query not working after upgrade

Post by Woody »

I had same basic question as original post but the answer seemed complicated. With the help of stackoverflow may I suggest the database value ("Type" in his case) should be mapped to mobileradiogroup_31's "Selected" property and the following js should be used:

code$("input[name=mobileradiogroup_31][value=" + value + "]").prop('checked', true);
/code

I'm sure most people know this but I figured it might help some noob like me :)

ref: http://stackoverflow.com/questions/46...

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Javascript to select radio button on database query not working after upgrade

Post by Alena Prykhodko »

Thank you Woody.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Javascript to select radio button on database query not working after upgrade

Post by Jack Bua »

Definitely helped me. I was using an if else statement similar to the poster. Thank you.

Post Reply