源码论坛,商业源码下载,尽在锦尚中国商业源码论坛
标题:
赤峰房产乱码问题
[打印本页]
作者:
tgn0323
时间:
2010-11-21 14:25
标题:
赤峰房产乱码问题
页面一。。。。。。[load.php]
<?php
require dirname(__FILE__).'/include/common.inc.php';
if($field == 'catid'){
if($modelid){
$CATEGORY = submodelcat($modelid);}
$str = '<select onchange="$(\'#catid\').val(this.value);this.disabled=true;category_load(this.value);"><option value="0">'.$LANG['please_select'].'</option>';
$options = '';
foreach($CATEGORY as $i=>$v){
if((isset($id) && $v['parentid'] == $id) || (isset($module) && $v['module'] == $module)) $options .= '<option value="'.$i.'">'.$v['catname'].'</option>';}
if(empty($options)) exit;
$str .= $options.'</select>';}
elseif($field == 'areaid' && $value){
$str = '<select onchange="$(\'#'.$value.'\').val(this.value);this.disabled=true;area_load(this.value);"><option value="0">'.$LANG['please_select'].'</option>';
$options = '';
foreach($AREA as $i=>$v){
if($v['parentid'] == $id) $options .= '<option value="'.$i.'">'.$v['name'].'</option>';}
if(empty($options)) exit;
$str .= $options.'</select>';}
elseif($field == 'areaid' && !$value){
$str = '<select onchange="$(\'#areaid\').val(this.value);this.disabled=true;areaid_load(this.value);"><option value="0">'.$LANG['please_select'].'</option>';
$options = '';
foreach($AREA as $i=>$v){
if($v['parentid'] == $id) $options .= '<option value="'.$i.'">'.$v['name'].'</option>';}
if(empty($options)) exit;
$str .= $options.'</select>';}
echo $str;
?>
页面二
function areaid($field, $value, $fieldinfo){
global $AREA;
extract($fieldinfo);
$js = "<script language='javascript' charset='gbk'>
function area_load(id){
$.get('load.php', {field: 'areaid', id: id, value: '".$field."' },
function(data){
$('#load_$field').append(data);});}
function area_reload(){
$('#load_$field').html('');
area_load(0);}
area_load(0);
</script>";
if($value){
$areaname = $AREA[$value]['name'];
return "<input type=\"hidden\" name='info[$field]' id='$field' value='$value'>
<span onclick=\"this.style.display='none';\$('#reselect_$field').show();\" style=\"cursor:pointer;\">$areaname <font color=\"red\">点击重选</font></span>
<span id=\"reselect_$field\" style=\"display:none;\"><span id=\"load_$field\"></span> <a href=\"javascript:area_reload();\">重选</a></span>$js";}
else{
return "<input type='hidden' name='info[$field]' id='$field' value='$value'><span id='load_$field'></span> <a href='javascript:area_reload();'>重选</a>$js";}}
在这个面里调用。刷新后就乱码
作者:
zgliqiang
时间:
2010-11-23 15:47
没发现这个问题。
欢迎光临 源码论坛,商业源码下载,尽在锦尚中国商业源码论坛 (https://bbs.52jscn.com/)
Powered by Discuz! X3.3