Welcome Guest, Not a member yet? Register   Sign In
unable to send javascript variable to controller
#2

(This post was last modified: 05-02-2017, 08:28 AM by xenomorph1030.)

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().
Reply


Messages In This Thread
RE: unable to send javascript variable to controller - by xenomorph1030 - 05-02-2017, 08:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB