本文整理汇总了PHP中DataForm::js_escape方法的典型用法代码示例。如果您正苦于以下问题:PHP DataForm::js_escape方法的具体用法?PHP DataForm::js_escape怎么用?PHP DataForm::js_escape使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataForm
的用法示例。
在下文中一共展示了DataForm::js_escape方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
//.........这里部分代码省略.........
ob_start();
$this->dataedit();
$rt = ob_get_contents();
@ob_end_clean();
$ret = json_decode($rt);
if ($ret->status == 'A') {
$data = array();
$data['id_sfac'] = $ret->pk->id;
$mSQL = $this->db->update_string('sinvehiculo', $data, 'id=' . $this->db->escape($id));
$this->db->simple_query($mSQL);
redirect($this->url . 'ddataprint/modify/' . $data['id_sfac']);
return;
} else {
$edit->error_string = htmlentities(utf8_decode($ret->mensaje));
$edit->build_form();
}
}
$script = '<script type="text/javascript" >
$(function() {
$(".inputnum").numeric(".");
$(".inputonlynum").numeric();
$("#vh_tasa").change(function(){ calcula(); });
$("#vh_precio").change(function(){ calcula(); });
$("#vh_precioplaca").bind("keyup",function() { calcula(); });
//$("#vh_montoiva").bind("keyup",function() { calculaiva(); });
calcula();
$("#cod_cli").autocomplete({
source: function( req, add){
$.ajax({
url: "' . site_url('ajax/buscascli') . '",
type: "POST",
dataType: "json",
data: "q="+req.term,
success:
function(data){
var sugiere = [];
if(data.length==0){
$("#cod_cli").val("");
$("#nombre").val("");
$("#nombre_val").text("");
$("#rifci_val").text("");
}else{
$.each(data,
function(i, val){
sugiere.push( val );
}
);
}
add(sugiere);
},
})
},
minLength: 2,
select: function( event, ui ) {
$("#cod_cli").attr("readonly", "readonly");
$("#nombre").val(ui.item.nombre);
$("#nombre_val").text(ui.item.nombre);
$("#rifci_val").text(ui.item.rifci);
$("#cod_cli").val(ui.item.cod_cli);
setTimeout(function() { $("#cod_cli").removeAttr("readonly"); }, 1500);
}
});
});
' . $jsc . '
function sfpatipo(id){
id = id.toString();
tipo = $("#tipo_"+id).val();
sfpade = ' . $edit->js_escape($sfpade) . ';
sfpach = ' . $edit->js_escape($sfpach) . ';
banco = $("#banco_"+id).val();
if(tipo==\'DE\' || tipo==\'NC\' || tipo==\'DP\'){
$("#banco_"+id).html(sfpade);
}else{
$("#banco_"+id).html(sfpach);
}
$("#banco_"+id).val(banco);
return true;
}
</script>';
$data['content'] = $edit->output;
$data['script'] = script('jquery.js');
$data['script'] .= script('jquery-ui.js');
$data['script'] .= script('plugins/jquery.numeric.pack.js');
$data['script'] .= script('plugins/jquery.floatnumber.js');
$data['script'] .= script('plugins/jquery.ui.autocomplete.autoSelectOne.js');
$data['script'] .= phpscript('nformat.js');
$data['head'] = $this->rapyd->get_head();
$data['head'] .= style('redmond/jquery-ui-1.8.1.custom.css');
//$data['script'] = script('jquery.js').script('plugins/jquery.numeric.pack.js').script('plugins/jquery.floatnumber.js').phpscript('nformat.js');
$data['script'] .= $script;
$data['title'] = heading($this->tits);
$this->load->view('view_ventanas', $data);
}