Page 2 of 2

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

Posted: Wed Oct 15, 2014 12:28 am
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.


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

Posted: Wed Oct 15, 2014 2:22 pm
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.


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

Posted: Wed Oct 15, 2014 2:36 pm
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?


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

Posted: Wed Oct 15, 2014 2:48 pm
by Kateryna Grynko

Hi Daniel,

I deleted your post.


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

Posted: Sat Dec 20, 2014 4:20 pm
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...


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

Posted: Sat Dec 20, 2014 5:53 pm
by Alena Prykhodko

Thank you Woody.


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

Posted: Fri Jul 10, 2015 3:33 am
by Jack Bua

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