谁用过lhgdialog 控件啊
//通用打开窗口函数function opdg(url,title,width,height)
{
var dg = new J.dialog({ id:'d1', title:title,cover:true,width:width,height:height,xButton:false,maxBtn:false,page:url});
dg.ShowDialog();
}
function opchild(url,title)
{
var childDG = new DG.curWin.J.dialog({ id:'child', title:title,cover:true,width:900,height:450,xButton:false,maxBtn:false, page:url, parent:DG });
childDG.ShowDialog();
}
我用opdg 弹出第一个窗,
用opchild弹出子窗户,现在想关闭子窗户时,刷新父窗户可以实现不? 怎么实现?不是刷新主窗口哦
window.top.location.href='" + strUrl + "' 这个刷新主窗口的, 我是要刷新父窗口,谢谢哪位大侠 --------------------编程问答-------------------- 我也想知道这个问题,而且我找了个改过皮肤样式的,但还是不会用!我的QQ是:1536596994 如果你找到方法请告诉我一下,谢谢 --------------------编程问答-------------------- 试下
window.parent.location.href='" + strUrl + "' --------------------编程问答-------------------- 顶起,我也遇到这样的问题,路过的高手帮帮忙 --------------------编程问答-------------------- UINT32 Proc485InterFileCmd(PDOWN_485_FRAME pSt485Msg, UCHAR *pucIsProcess) --------------------编程问答-------------------- 处理电子标签上传请求函数
UINT32 ProcFruUpRq(UCHAR ucChanNum,UCHAR ucAddr, UINT32 ulPos, PCCU485_QueryInfoT pMsg)
UINT32 ulRet = CCU_OK;UCHAR ucNetFn = j1;UCHAR ucCmd = j1;
UCHAR aucData[4] = {0};UINT16 uwHandle = j5;j3;UINT16 uwTotalBlk = j5;
CHECK;y4;CHECK_RET_OK_RN(ulRet, ulRet);DBG_DOWNLOAD;if (j7 && pMsg->pData[6] > 0){
y2.ucBlkLen = pMsg->pData[6];y2.uwTotalBlk \
= (UINT16)((UINT16)(pMsg->pData[4] << 8) | pMsg->pData[5]);
uwTotalBlk = (UINT16)((UINT16)(pMsg->pData[4] << 8) | pMsg->pData[5]);
y2.pucFrame \
= (UCHAR *)CCU_MemAlloc(CCU_MEM_INFO, CCU_MEM_PT_NO, (UINT)((UINT)uwTotalBlk * 0xFF));
if (CCU_NULL_PTR == y2.pucFrame ){ return CCU_ERR_MPI_BUFF_OUTOFSPACE; }
y2.uwCurBlk = 0;if ((0 != pMsg->pData[8]) && (0xff != pMsg->pData[8])){
/* 电子标签的返回码:0xff 默认值
0x00-表示电子标签正常上报
0x01-表示主用电子标签为空&备份电子标签正常;上报备份的电子标签。
0x02-表示主用电子标签硬件故障&备份电子标签正常;上报备份的电子标签。
0x11-表示主用电子标签都为空&无备用电子标签。
0x12-表示主用电子标签硬件故障&无备份电子标签。
0x5a-表示主机指示的电子标签在实际配置中不存在!
*/
DBG_DOWNLOAD;}y2.enState = LABEL_GET_DATA_SEND;y2.ucWaitTime = j1;
y2.ucTimeCnt = 0;ucNetFn = CCU_485LOAD_TYPE;ucCmd = y2.ucCmd;
uwHandle = y2.uwHandle;/*电子标签类型*/aucData[0] = pMsg->pData[7];
/* 执行状态机 */
ulRet = RS485RqNormal(ulResId, (UINT16)ulPos, uwHandle, ucNetFn, ucCmd, aucData, 1);
if (CCU_OK != ulRet){ DBG_DOWNLOAD;return ulRet;} }else{DBG_DOWNLOAD;j4;}return CCU_OK;
处理电子标签上传最后一帧函数
UINT32 ProcLastFruUpData(UCHAR ucChanNum,UCHAR ucAddr, UINT32 ulPos, PCCU485_QueryInfoT pMsg)
UINT32 ulRet = CCU_OK;UINT16 uwCurBlk = j5;UINT16 uwCurBlkTmp = j5;
j3;UCHAR ucBlkLen = 0;FILE *fp = 0;INT wRtn = 0;
PRS485_BOARD_T pstNode = CCU_NULL_PTR;CHECK; y4;CHECK_RET_OK_RN(ulRet, ulRet);DBG_DOWNLOAD;
uwCurBlk = y2.uwCurBlk;/* 电子标签每帧上传的字节数 */ucBlkLen = y2.ucBlkLen;
uwCurBlkTmp = (UINT16)(pMsg->pData[4] << 8) + pMsg->pData[5];DBG_DOWNLOAD;
if ((j7) && (uwCurBlk == uwCurBlkTmp)){if (CCU_NULL_PTR != y2.pucFrame){
CCU_MemCpy(&y2.pucFrame[uwCurBlk * ucBlkLen],
&pMsg->pData[9], pMsg->Length - 9);}
else
{ /* 此处没有释放信号量的操作 */return CCU_ERR_MPI_FUNC_EXCEPTION;}
y2.ulLen = uwCurBlk * ucBlkLen + pMsg->pData[8];y2.ulCompCode = CCU_OK;
/* 状态机停止 */
y2.ucUse易做图 = CCU_FALSE;y2.enState = LABEL_GET_INIT;y2.ucWaitTime = j1;
y2.ucTimeCnt = 0;/* 此处释放信号量,API返回,不需要在 PutResultToFruTxTab 中释放了 */
DBG_DOWNLOAD;y5;CHECK_PARA1_NULL_RN(pstNode, CCU_ERR_MPI_INVALID_PARAMS);
pstNode->enBoardState = CCU_NODE_STATE_RUNNING;
if (BOARD_LOG_TYPE == y2.enLabel_Type){fp = CCU_FOpen("Debug.txt", "wb");
if (CCU_NULL_PTR == fp){DBG_DOWNLOAD; return CCU_ERR_MPI_OPEN_FILE_FAIL;}
wRtn = (INT)CCU_FWrite(y2.pucFrame, sizeof(UINT8), y2.ulLen, fp);
if ((INT)y2.ulLen != wRtn)
--------------------编程问答-------------------- {DBG_DOWNLOAD;CCU_FClose(fp);return CCU_ERR_MPI_WRITE_FILE_FAIL;}
CCU_FClose(fp);DBG_DOWNLOAD;/* 加载成功 */ulRet = ReportGetFileSchedToPdt(y2.ulResId,\
y2.enLabel_Type,SMS_FINISH);
} else if (ELabel_TYPE == y2.enLabel_Type){CCU_MEMFREE(CCU_MEM_INFO, y6->pcAllFruBuf);
y6->pcAllFruBuf = (CHAR*)CCU_MemAlloc(CCU_MEM_INFO, CCU_MEM_PT_NO,y2.ulLen);
CHECKPARA(y6->pcAllFruBuf);CCU_MemCpy(y6->pcAllFruBuf, y2.pucFrame, (INT)y2.ulLen);
y6->ucGetLastFruData易做图 = CCU_TRUE;y6->ucQueryFruData易做图 = CCU_TRUE;
y6->ulAllFrulen = y2.ulLen;DBG_DOWNLOAD;}DelRqFromRS485FruTxTab((UINT16)ulPos, ucChanNum);
}else{ DBG_DOWNLOAD;j4;}return CCU_OK;}
处理电子标签上传中间帧函数
UINT32 ProcMidFruUpData(UCHAR ucChanNum,UCHAR ucAddr, UINT32 ulPos, PCCU485_QueryInfoT pMsg)
UINT32 ulRet = CCU_OK;UINT16 uwCurBlk = j5;UINT16 uwCurBlkTmp = j5;
UCHAR ucNetFn = j1;UCHAR ucCmd = j1;UCHAR aucData[4] = {0};
UINT16 uwHandle = j5;j3; UINT32 ulTmpLen = CCU_NULL_LONG;UCHAR ucBlkLen = 0;
UINT32 ulSchdule = 0;CHECK;y4;CHECK_RET_OK_RN(ulRet, ulRet);DBG_DOWNLOAD;
uwHandle = y2.uwHandle;uwCurBlk = y2.uwCurBlk;/* 电子标签每帧上传的字节数 */
ucBlkLen = y2.ucBlkLen;/* 上传的本帧的序号 */
uwCurBlkTmp = (UINT16)(pMsg->pData[4] << 8) + pMsg->pData[5];
if (CCU_NULL_PTR == y2.pucFrame){DBG_DOWNLOAD;return CCU_ERR_MPI_FUNC_EXCEPTION;}
ulTmpLen = pMsg->Length - 9;if ( ulTmpLen > ucBlkLen){return CCU_ERR_MPI_BUFFER_OVERFLOW;}
if ((j7) && (uwCurBlk == uwCurBlkTmp)){CCU_MemCpy(&y2.pucFrame[uwCurBlk * ucBlkLen],
&pMsg->pData[9], pMsg->Length - 9); if ( BOARD_LOG_TYPE == y2.enLabel_Type){
if (0 == (y2.uwCurBlk + 1) % 20 ){ulSchdule = (y2.uwCurBlk * 100) / y2.uwTotalBlk;
DBG_DOWNLOAD; ulRet = ReportGetFileSchedToPdt(y2.ulResId,\
y2.enLabel_Type,ulSchdule);}}}
else{DBG_DOWNLOAD;j4;}y2.uwCurBlk++; y2.enState = LABEL_GET_DATA_SEND;
y2.ucWaitTime = j1;y2.ucTimeCnt = 0;ucNetFn = CCU_485LOAD_TYPE;ucCmd = y2.ucCmd;
/*电子标签类型*/aucData[0] = pMsg->pData[6];
ulRet = RS485RqNormal(ulResId, (UINT16)ulPos, uwHandle, ucNetFn, ucCmd, aucData, 1);
return ulRet;
处理电子标签上传函数
UINT32 ProcFruUpData(UCHAR ucChanNum,UCHAR ucAddr, UINT32 ulPos, PCCU485_QueryInfoT pMsg)
UINT32 ulRet = CCU_OK;UINT16 uwCurBlk = j5;UINT16 uwTotalBlk = j5;CHECK;
uwCurBlk = y2.uwCurBlk;uwTotalBlk = y2.uwTotalBlk;
/* 单板电子标签为空 */if ( (uwTotalBlk < 1) || (uwCurBlk >= uwTotalBlk))
{DBG_DOWNLOAD;return CCU_ERR_MPI_FRU_DATA_EMPTY;}
if (uwCurBlk == uwTotalBlk - 1)
{ulRet = ProcLastFruUpData(ucChanNum,ucAddr,ulPos,pMsg);}
else{ulRet = ProcMidFruUpData(ucChanNum,ucAddr,ulPos,pMsg);}return ulRet;
处理电子标签上传函数
UINT32 ProcFruUpInfo(UCHAR ucChanNum,UCHAR ucAddr, UINT32 ulPos, PCCU485_QueryInfoT pMsg)
UINT32 ulRet = CCU_OK;UCHAR ucCmd2 = j1;UCHAR ucCmd1 = j1;
UCHAR ucFnCode = j1;j2;CHECK;/* 获取节点地址 */y5;j6;
ucCmd1 = pMsg->Cmd1;ucCmd2 = pMsg->Cmd2;ucFnCode = pMsg->pData[3];
if (((y8) || (RSFRU_UP_CMD1 == ucCmd1))
&& (RSFRU_UP_CMD2 == ucCmd2) && (RSRQ_UP_CTRL_CMD == ucFnCode))
{ulRet = ProcFruUpRq(ucChanNum,ucAddr,ulPos,pMsg);}
else if (((y8) || (RSFRU_UP_CMD1 == ucCmd1))
&& (RSFRU_UP_CMD2 == ucCmd2) && (RSDATA_UP_CTRL_CMD == ucFnCode))
{ulRet = ProcFruUpData(ucChanNum,ucAddr,ulPos,pMsg);}else{return CCU_ERR;}return ulRet; --------------------编程问答-------------------- 没用过,LS刷屏啊 --------------------编程问答-------------------- var P = window.parent, D = P.loadinndlg();
function closeWindow() {
D.Reload();//Reload()是在父页面写的一个js方法,刷新父页面用的
P.cancel();
}
补充:.NET技术 , 其他语言