js ajax doesn't work |
02-20-2016, 04:24 PM
(This post was last modified: 02-21-2016, 09:49 PM by kilishan. Edit Reason: Added code tags for better readability. )
Hi,
I have probably a simple yet annoying issue with a json query. I want to verify an input value against the value in de customers database (column cf1). With the code so far i recognize that the ajax is not functioning well, the result is always false therefore the function is ending without the desired check. I have a function in pos.js which i rewrited to add a checkup on input value. In this code i check the input value (ref) and check it on a function in pos.php if it belongs to the current user. js file ------ Code: $('#suspend_sale').click(function () { In pos.php i have a function to check the input value retrieved from the js code. Code: function get_user_pin($code) { In pos_model.php i have a function that actually calls the database and retrieves the value based upon the current user id Code: public function GetUserPINbyID($pincode) { What is false in my approach, and how can i resolve this?
Maybe something more like this, where the ref(code) is passed in the URL, as the controller method is expecting it:
Code: $('#suspend_sale').click(function () { |
Welcome Guest, Not a member yet? Register Sign In |