Welcome Guest, Not a member yet? Register   Sign In
No value in the call back - Jason - Jquery
#8

[eluser]Shiju S S[/eluser]
There was two errors;
1. In the controller ( Select query). After that I got the success message from getJSON.
2. Second was in getting the correct index for the parameter data.

Regarding the headers and log console as explained by one of the member, I have lesser idea and have to workout.
Thanks for the help.

Correct code is given below.
Code:
<!-- onchange patient name field -->
<$cript>
var base_url = "&lt;?php echo base_url();?&gt;";
$('#textPatientage').focus(function()
{
var key = $('#tags').val();
var jqxhr = $.getJSON(base_url + "franchisee_lab_investigations/get_patient_details/" + key, function(data) {
  $( "#textPatientage" ).val(data[0].c_patient_age);
  $( "#textPatientsex" ).val(data[0].c_patient_sex);
  $( "#textPhonenumber" ).val(data[0].c_patient_mob);
  $( "#textemail" ).val(data[0].c_patient_email);
  $( "#textdoctor" ).val(data[0].c_patient_doctor);
  $( "#patient_id" ).val(data[0].c_patient_id);
});
});
</$cript>


Messages In This Thread
No value in the call back - Jason - Jquery - by El Forum - 02-25-2013, 09:39 AM
No value in the call back - Jason - Jquery - by El Forum - 02-25-2013, 09:44 AM
No value in the call back - Jason - Jquery - by El Forum - 02-25-2013, 09:51 AM
No value in the call back - Jason - Jquery - by El Forum - 02-25-2013, 09:56 AM
No value in the call back - Jason - Jquery - by El Forum - 02-25-2013, 10:34 AM
No value in the call back - Jason - Jquery - by El Forum - 02-25-2013, 11:20 AM
No value in the call back - Jason - Jquery - by El Forum - 02-25-2013, 03:48 PM
No value in the call back - Jason - Jquery - by El Forum - 02-26-2013, 10:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB