954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

call javascript function in a view from controller

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?

mwenyenia07
Light Poster
40 posts since Jul 2011
Reputation Points: 9
Solved Threads: 1
 

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.

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You