Welcome Guest, Not a member yet? Register   Sign In
codeigniter and prototype
#1

[eluser]Unknown[/eluser]
Hello,

I am trying to integrate codeigniter with prototype and $this->validation->error_string comes empty after an ajax request.



function insertLocation()
{
var parameters = $('property_address').serialize(true) + '&' +
$('property_city').serialize(true) + '&' +
$('property_state').serialize(true) + '&' +
$('property_zip_code').serialize(true) + '&' +
$('land_area').serialize(true) + '&' +
$('number_parking_spaces').serialize(true) + '&' +
$('photo_land').serialize(true) + '&' +
$('mapquest').serialize(true) + '&' +

new Ajax.Request('<?= site_url();?>/define_location/verifydefinelocation',
{
method: 'post',
parameters: parameters,
onComplete: showResponse
});
}

function showResponse(originalRequest)
{
if (originalRequest.responseText == <?= SIGNAL_HANDLER_ERROR_VALIDATION; ?&gtWink {

$('define_location_status')[removed] = '<?= $this->validation->error_string; ?>';
}
else {
$('define_location_status')[removed] = originalRequest.responseText;
}

}


Ideas?




Theme © iAndrew 2016 - Forum software by © MyBB