CodeIgniter Forums
codeigniter and prototype - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: codeigniter and prototype (/showthread.php?tid=6861)



codeigniter and prototype - El Forum - 03-14-2008

[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?