У меня есть два кадра в htm с именем pageSet и resultSet, как показано ниже для одной страницы
SearchFrame.htm
<frameset rows="28%,3%, *" cols="*" frameborder="NO" framespacing="0">
<frame class="NoBorder" src="CorrespondenceSearchLoadRedirect.htm" name="topSearch" marginwidth="3" marginheight="0">
<frame class="NoBorder" src="" name="pageSet" scrolling="NO" marginwidth="3" marginheight="0">
<frame class="NoBorder" src="" name="resultSet" marginwidth="3" marginheight="0">
</frameset>
При нажатии кнопки поиска мы вызываем функцию searchCorrespondence (1) для pageSetрезультат как показано ниже ..
функция searchCorrespondence, вызывающая ниже xsl-файл как результат.
SearchPageSummary.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="CORRESPONDENCESEARCH_PAGE_LIST">
<html>
<xsl:variable name="CurrentPage" select="//CORRESPONDENCESEARCH_PAGE_LIST/CORRESPONDENCESEARCH_REQUEST/CURRENT_PAGE"/>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
<link rel="stylesheet" href="./style.css" type="text/css"/>
<title>Correspondence Search Page Summary</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<SCRIPT LANGUAGE="JavaScript" SRC="./JavaScript/common.js">//</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="./JavaScript/xml.js">//</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="./JavaScript/clientStateAPI.js">//</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="./correspondenceSearch.js">//</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" >
function retrieveSearchCriteria(){
document.crrsPageSummaryForm.searchcriteria.value = srchCriteria.innerHTML;
loadPage(<xsl:value-of select="$CurrentPage"/>);
}
</SCRIPT>
</head>
<body class="WorkArea" onload="retrieveSearchCriteria();">
<form method="post" name="crrsPageSummaryForm" action="">
<xsl:variable name="NumberOfPages" select="NUMBER_OF_PAGES"/>
<input type="hidden" name="searchcriteria"/>
<input type="hidden" name="NumberOfPages" >
<xsl:attribute name="value">
<xsl:value-of select="$NumberOfPages"/>
</xsl:attribute>
</input>
<input type="hidden" name="CurrentPage" >
<xsl:attribute name="value">
<xsl:value-of select="$CurrentPage"/>
</xsl:attribute>
</input>
<DIV id="srchCriteria" class="hiddenfields">
<xsl:copy-of select="CORRESPONDENCESEARCH_REQUEST" />
</DIV>
<xsl:variable name="WidthOfText" select="100-($NumberOfPages * 3)"/>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>
<xsl:attribute name="width">
<xsl:value-of select="concat(string($WidthOfText),'%')"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$NumberOfPages = '0'">
No correspondence found meeting search criteria.
</xsl:when>
<xsl:when test="$NumberOfPages = '11'">
Too many pages found meeting search criteria. Results limited to 10 pages.
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$NumberOfPages"/> pages found meeting search criteria.
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<xsl:for-each select="PAGE_DETAIL">
<xsl:if test="self::node()[PAGE_NUMBER = $CurrentPage]">
<input type="hidden" name="StartIndex" >
<xsl:attribute name="value"><xsl:value-of select="PAGE_START_INDEX"/></xsl:attribute>
</input>
<input type="hidden" name="EndIndex" >
<xsl:attribute name="value"><xsl:value-of select="PAGE_END_INDEX"/></xsl:attribute>
</input>
</xsl:if>
<xsl:if test="self::node()[PAGE_NUMBER != '11']">
<td><a>
<xsl:attribute name="href">javascript:loadPage(<xsl:value-of select="PAGE_NUMBER"/>,<xsl:value-of select="PAGE_START_INDEX"/>,<xsl:value-of select="PAGE_END_INDEX"/>);
</xsl:attribute>
<xsl:value-of select="PAGE_NUMBER"/>
</a>
</td>
</xsl:if>
</xsl:for-each>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
в этой загрузке xsl мы вызываем функцию onLoadPage, которая используетсядля вызова другого xsl-файла.
onloadPage.js
function loadPage(CurrentPage, StartIndex, EndIndex){
var PageSetForm = top.loginFrame.workArea.pageSet.document.crrsPageSummaryForm;
var NumberOfPages = PageSetForm.NumberOfPages.value;
PageSetForm.CurrentPage.value = CurrentPage;
if(NumberOfPages == 0){
toggleUpdatebutton("false");
top.loginFrame.workArea.resultSet.location = "blank.gif";
return;
}
if(loadPage.arguments.length==1){
StartIndex = PageSetForm.StartIndex.value;
EndIndex = PageSetForm.EndIndex.value;
}else{
PageSetForm.StartIndex.value = StartIndex;
PageSetForm.EndIndex.value = EndIndex;
}
toggleUpdatebutton("true");
var dom = new DOMDocument();
var xmlreq = new XMLRequest();
var mgr = dom.createElement( "CORRESPONDENCESEARCH_PAGE_REQUEST" );
var strtIndex = dom.createElement("START_INDEX");
var endIndex = dom.createElement("END_INDEX");
strtIndex.appendChild(createTextNode(""+StartIndex));
endIndex.appendChild(createTextNode(""+EndIndex));
//Changes for GET to POST - SiteMinder Conversion starts here
//var actualcriteria = createTextNode(PageSetForm.searchcriteria.value);
var actualcriteria = createTextNode(PageSetForm.searchcriteria.value,"false");
//Changes for GET to POST - SiteMinder Conversion ends here
mgr.appendChild(actualcriteria);
mgr.appendChild(strtIndex);
mgr.appendChild(endIndex);
dom.appendChild(mgr);
xmlreq.setStylesheet( "CorrespondenceSearchResults.xsl" );
xmlreq.addCallWithSession( "METVBE_DEV1.sendCorrespondence", "searchResults", "1", dom );
if(top.clientState.document.ContainerForm.AlertMessages.value == "true"){
alert( xmlreq.xml(true) );
}
if(top.clientState.document.ContainerForm.ServerType.value == "appserver"){
//Changes for GET to POST - SiteMinder Conversion starts here
//top.loginFrame.workArea.resultSet.location = xmlreq.getRequest();
submitRequest(xmlreq.getRequest(),"resultSet");
//Changes for GET to POST - SiteMinder Conversion ends here
}
}
CorrespondenceSearchResults.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="CORRESPONDENCESEARCH_RESULTS">
<xsl:variable name="quote">
<xsl:text>"</xsl:text>
</xsl:variable>
<html>
<head>`
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
<link rel="stylesheet" href="./style.css" type="text/css"/>
<title>referralSearch</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<SCRIPT LANGUAGE="JavaScript" SRC="./JavaScript/common.js">//</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="./JavaScript/xml.js">//</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="./JavaScript/clientStateAPI.js">//</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="./correspondenceSearch.js">//</SCRIPT>
</head>
<body class="WorkArea">
<form method="post" name="crrsSearchResultsFrm" action="" onsubmit="return false;">
<input name="warningShown" type="hidden" value="false"/>
<xsl:for-each select="//CORRESPONDENCESEARCH_RESULTS/DOMAIN_INFO/CRRS_PRINT_STTS_LIST/CRRS_PRINT_STTS">
<input name="DomainPrintSttsCd" type="hidden">
<xsl:attribute name="value"><xsl:value-of select="CRRS_PRINT_STTS_CD"/></xsl:attribute>
</input>
<input name="DomainPrintSttsDesc" type="hidden">
<xsl:attribute name="value"><xsl:value-of select="CRRS_PRINT_STTS_DESC"/></xsl:attribute>
</input>
</xsl:for-each>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="12%" align="center" class="Enclosure">
<strong>Employee Id</strong>
</td>
<td width="30%" align="center" class="Enclosure">
<strong>Group Name</strong>
</td>
<td width="12%" align="center" class="Enclosure">
<strong>Plan Id</strong>
</td>
<td width="12%" align="center" class="Enclosure">
<strong>Correspondence Type</strong>
</td>
<td width="12%" align="center" class="Enclosure">
<strong>Creation Date</strong>
</td>
<td width="12%" align="center" class="Enclosure">
<strong>Scheduled Print Date</strong>
</td>
<td align="center" width="10%" class="Enclosure">
<strong>Status</strong>
</td>
</tr>
<tr><td colspan="7"><img src="1pixel.gif" width="1" height="5" border="0"/></td></tr>
<xsl:for-each select="CORRESPONDENCE">
<tr>
<input name="CorrespondenceId" type="hidden">
<xsl:attribute name="value"><xsl:value-of select="SYS_CRRS_ID_NUM"/></xsl:attribute>
</input>
<td width="12%" align="center">
<xsl:value-of select="INDV_EMPE_ID"/>
</td>
<td width="30%" align="center">
<xsl:value-of select="GRP_CO_NM"/>
</td>
<td width="12%" align="center">
<xsl:value-of select="SYS_PLAN_SEQ_NUM"/>
</td>
<td width="12%" align="center">
<xsl:variable name="CrrsType" select="USR_CRRS_TYP_CD"/>
<xsl:for-each select="//CORRESPONDENCESEARCH_RESULTS/DOMAIN_INFO/CRRS_TYPE_LIST/CRRS_TYPE">
<xsl:if test="$CrrsType = CRRS_TYP_CD">
<xsl:value-of select="CRRS_TYP_NM"/>
</xsl:if>
</xsl:for-each>
</td>
<td width="12%" align="center">
<xsl:value-of select="USR_CRRS_CRT_DT"/>
</td>
<xsl:variable name="ScheduledPrintDate" select="concat($quote,CRRS_SCHD_PRN_DT,$quote)"/>
<xsl:variable name="PrintInd" select="concat($quote,USR_PRN_IND,$quote)"/>
<script language="javascript">
writeColumns(<xsl:value-of select="$ScheduledPrintDate"/>,<xsl:value-of select="$PrintInd"/>);
</script>
<input name="OriginalScheduledPrintDate" type="hidden">
<xsl:attribute name="value"><xsl:value-of select="CRRS_SCHD_PRN_DT"/></xsl:attribute>
</input>
<input name="OriginalPrintStatus" type="hidden">
<xsl:attribute name="value"><xsl:value-of select="USR_PRN_IND"/></xsl:attribute>
</input>
</tr>
</xsl:for-each>
<tr><td colspan="7"><img src="1pixel.gif" width="1" height="5" border="0"/></td></tr>
</table>
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
в IE11, который CorrespondenceSearchResults.xsl не загружается и результаты не приходят,в консоли показывается как только один корневой элемент допускается ошибка.Как решить эту проблему?
в IE5 работает нормально.в консоли нет ошибок.