unable to send javascript variable to controller |
Your Ajax call is a bit extraneous when passing zplan as you have it in the URL and as a query parameter. I suggest picking one.
My legitimate suggestion is to study up on Javascript and PHP. You are clearly mixing the two in get_plan_value_by_id(). Once you remove the Javascript from your PHP function and assuming your query works correctly, you will have to return (echo/print in this case) a JSON object (do not load any views). An easy way is to use the built in PHP function json_encode(). |
Messages In This Thread |
unable to send javascript variable to controller - by apysan - 05-02-2017, 07:53 AM
RE: unable to send javascript variable to controller - by xenomorph1030 - 05-02-2017, 08:28 AM
RE: unable to send javascript variable to controller - by ogomez - 05-02-2017, 12:04 PM
RE: unable to send javascript variable to controller - by apysan - 05-07-2017, 09:53 AM
|