function Search() { new Ajax.Request(WEB_ROOT+'/ajax/envios-transito.php', { method:'post', parameters: $('frmSearch').serialize(), onLoading: function(){ $('contenido').innerHTML = LOADER2; }, onSuccess: function(transport){ var response = transport.responseText || "no response text"; var splitResponse = response.split("[#]"); $('contenido').innerHTML = ""; if(splitResponse[0] == "ok"){ $('contenido').innerHTML = splitResponse[1]; }else{ ShowStatus(splitResponse[1]); HideFview(); } }, onFailure: function(){ alert('Something went wrong...') } }); } function ExportGral(){ $("frmSearch").submit(); }