I have created a JavaScript function in a view which is supposed to return a value from a selected radio button. values from view fields are posted to a function of a controller which in turn will execute an associated model to save the data. how can i get the value returned from the javascript function so that i can assign it to a variable in order to save it?

I assume your controller is in PHP. PHP has no way to get data from javascript, so you will have to post the javascript value to PHP.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.