各位有没有碰到过这样的关于层的使用的杂症?????急死我了, 进来看看吧,多谢了!!

kangaroo 2002-11-12 11:05:37
在一个JSP页面里面,我有一个菜单在页面的顶部!!是用层来实现的!!!

因为我想实现局部刷新的效果,所以在页面里加入了一个 iFrame????

但是当我加入了之后!!!!,出错!!!!说什么层没定义!!!,各位有没有碰到这样的问题,帮忙想想办法,怎么解决,多谢了了先!!!!!
...全文
48 点赞 收藏 11
写回复
11 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
kangaroo 2002-11-12
唉,那就奇怪了!!!!!!!!我的就报错了!!!!!!!!!说什么层没定义!!!
回复
seabell 2002-11-12
还是没有出错啊,我是ie6
回复
kangaroo 2002-11-12
seabell(百合心) :
多谢你帮我看代码!!!!!

你是不是把菜单代码去掉了!!!!!!
如果去掉,那是可以的,不会报错,但是加上菜单之后就会了!!!!!!!

<div style="overflow:auto; width:100%" id="divMain" name="divMain">
</div>

有用到这个层吗???如果去掉这个,也是可以运行的,你的IE你什么版本,我是5.0!!

麻烦你再帮我看看!!!!多谢
回复
seabell 2002-11-12
我这里并没有报错啊
回复
kangaroo 2002-11-12
代码如上,当然菜单效果 看不到!!!
当客户Select 下拉框 里的show();函数执行的时候报错,曾未定义。

seabell(百合心):

你帮忙看看,多谢你了!!111111,多谢!!!


回复
kangaroo 2002-11-12
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolor="#cccccc">
<tr>

<td width="8%" height="20">め:</td>
<td width="38%" height="20">

<select name="CustomerID" onchange="show()">
<option value="">叫匡拒</option>
<%=customerStr%>
</select>
</td>

<td width="21%" height="20">厨基ら戳:</td>
<td width="33%" height="20">

<select name="Day">
<option>ら</option>
<%=dayStr%>
</select>

<select name="Month">
<option>る</option>
<%=monthStr%>
</select>

<select name="Year">
<option></option>
<%=yearStr%>
</select>
</td>
</tr>
<tr>

<td width="8%">羛蹈:</td>
<td width="38%">
<select name="Contact">
<option value="">叫匡拒</option>
<%=contactStr%>
</select>
</td>

<td width="21%">疭厨基虫絪腹:</td>
<td width="33%">

<input type="text" name="SQNo" value="<%=SQNo%>">
</td>
</tr>
<tr>

<td width="8%">筿杠:</td>
<td width="38%">
<input type="text" name="Tel">
</td>

<td width="21%">犁穨:</td>
<td width="33%">

<input type="text" name="Salesman" value="Auto">
</td>
</tr>
</table>

<table width="100%" border="1" cellspacing="0" cellpadding="1" bgcolor="#003399">
<tr>
<td><font color="#FFFFFF"><b>玻珇戈</b></font></td>
</tr>
</table>
<div width="100%" id=thedetailtableDIV>
<table align="center" border=0 cellpadding="1" cellspacing="0" width="100%">
<tr bgcolor="#cccccc" >
<td width="4%" >
<input type=checkbox onclick="selectallcheckbox(this)">
</td>
<td width="24%" >砏</td>
<td width="9%" >砋</td>
<td width="16%" >虫基(穝)</td>
<td width="15%" >虫基(Ω)</td>
<td width="25%" >称猔</td>
</tr>
<tbody id="tbdDistributions">
<tr>
<td width="4%" >
<input type="checkbox" name="record_select" class="check">
</td>
<td width="24%" >
<input type="text" name="ProductID" value='' size="30" >
</td>
<td width="9%" >
<select name="BagStyle">
<option value="">叫匡拒</option>
<%=bagStyleStr%>
</select>
</td>
<td width="16%" >
<select name="NewCurrency">
<option value="HK$" selected>HK$</option>
<option value="RMB$">RMB$</option>
</select>
<input type="text" name="NewUnitPrice" size="6">
</td>
<td width="15%" >
<select name="OldCurrency">
<option value="HK$" selected>HK$</option>
<option value="RMB$">RMB$</option>
</select>
<input type="text" name="Old_UnitPrice" size="6">
</td>
<td width="25%" >
<textarea name="Remarks" rows="2" cols="25"></textarea>
</td>
</tr>
<tr height=0 >
<td colspan=103 height=0 >
<input type="button" value="穝糤玻珇戈" class="bottom" onClick="addOnecargoProcess();" name="button">
 
<input type="button" value="埃玻珇戈" class="bottom" onClick="delOnecargoProcess();" name="button">
</td>
</tr>
</tbody>
</table>
</div>

<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td> </td>
</tr>
<tr>
<td align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="1">
<tr>
<td width="15%">疭厨基虫称猔:</td>
<td width="85%">
<textarea name="SQRemarks" cols="35" rows="2"></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center">
<input type="submit" name="Submit" value="絋﹚">
<input type="reset" name="Submit2" value="糶">
<input type="button" name="Submit3" value="">
</td>
</tr>
</table>
</form>

<textarea name="theHistoryRecord" style="display:none" ></textarea>
<iframe id="customer" name="customer" src="blank.htm"></iframe>
</div>
</body>
</html>
回复
kangaroo 2002-11-12
<%@ page language="java" contentType="text/html;charset=big5" %>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<link rel="stylesheet" href="css/menu.css">
<link rel="stylesheet" href="css/body.css">
<link rel="stylesheet" href="css/table.css">
<link rel="stylesheet" href="css/style.css">
<script ID="clientEventHandlersJS" LANGUAGE="JSCRIPT">
function window_onresize(){
var intHeight
intHeight = document.body.offsetHeight - GetOffsetTop(divMain)-0;
if(intHeight>40){
divMain.style.height = document.body.offsetHeight - GetOffsetTop(divMain);
}
}

function GetOffsetTop(objObject){
var objParent
intTop = objObject.offsetTop;
objParent = objObject.offsetParent;
while(null!=objParent){
intTop += objParent.offsetTop;
objParent = objParent.offsetParent;
}
return intTop;
}
</script>
<script language=javascript>
window.onload = historyOnemore;
window.onbeforeunload = fixHistory;

function fixHistory() //记住历史
{
document.all("theHistoryRecord").innerText=document.all("thedetailtableDIV").innerHTML;
}

function historyOnemore() //恢复历史
{
if (document.all("theHistoryRecord").innerText!=""){ document.all("thedetailtableDIV").innerHTML=document.all("theHistoryRecord").innerText;
}
}

function selectallcheckbox(obj) //全选或全不选
{
var tureorfalse=obj.checked;
var theDetail=tbdDistributions.rows;
for(var i=0;i<theDetail.length-1;i++)
{
theDetail[i].all("record_select").checked=tureorfalse;
}
}

function addOnecargoProcess() //增加明细
{

var theRecordSelects = document.all("record_select");
var theFirstSelectedCargo=0;
for(var i=0;i<theRecordSelects.length;i++)
{
if (theRecordSelects[i].checked==true) {theFirstSelectedCargo=i;break;}
}

var newRow = tbdDistributions.rows[theFirstSelectedCargo].cloneNode(true);
var desRow = tbdDistributions.rows[theFirstSelectedCargo+1];
desRow.parentElement.insertBefore(newRow,desRow );

}

function delOnecargoProcess() //删除货物明细
{
var theRecordSelects = document.all("record_select");
if (tbdDistributions.rows.length<3)
{
if (theRecordSelects.checked==true) alert("ぃ盢┮Τ玻珇戈常埃奔");
return false;
}
if (confirm("絋﹚琌匡拒タ絋盢璶埃硂ㄇ玻珇?")==false) return false;
for(var i=0;i<theRecordSelects.length;i++)
{
if ((theRecordSelects[i].checked==true)&&(tbdDistributions.rows.length>2))
{
tbdDistributions.deleteRow(i);
i=i-1;
}
}
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function show() {
// document.form1.storehouse.value=document.form1.Store.value;
document.form1.target="customer";
document.form1.action="returnCustomerDetails.jsp";
document.form1.submit();
}
function filter(){
document.form1.action="new_special_quotation.jsp";
document.form1.submit();
}
//-->
</SCRIPT>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body CLASS="mybody" SCROLL="no" onresize="window_onresize()" onload="window_onresize()" bgcolor="#ffffff" topmargin="0" >
<script src="js/menu.js"></script>
<script src="js/fade.js"></script>
<script src="menu.js"></script>
<div style="overflow:auto; width:100%" id="divMain" name="divMain">

<form name="form1" method="post" action="new_sq_preview.jsp">
<font color=gray>犁穨场  <img name="meun_r2_c7" src="top/arrow.gif" width="10" height="10" border="0">  疭厨基虫
  <img name="meun_r2_c7" src="top/arrow.gif" width="10" height="10" border="0">  穝糤疭厨基虫
</font>
<table width="100%" border="1" cellspacing="0" cellpadding="1">
<tr>
<td bgcolor="#003399"><font color="#FFFFFF"><b>穝糤疭厨基虫</b></font></td>
</tr>
</table>
回复
seabell 2002-11-12
最好把代码贴上来
回复
worldceo 2002-11-12
可以用层的
回复
kangaroo 2002-11-12
seabell(百合心):
不管怎样,都要谢谢你,多谢了,我自己试试看!!!
回复
seabell 2002-11-12
sorry那我也不清楚了,把name去掉试试
<div style="overflow:auto; width:100%" id="divMain">
回复
相关推荐
发帖
JavaScript
创建于2007-09-28

8.5w+

社区成员

Web 开发 JavaScript
申请成为版主
帖子事件
创建了帖子
2002-11-12 11:05
社区公告
暂无公告