I am trying to add paging, but i am getting error in between itself. Hope this helps. Thanks again for your help.
Here is my xml file
- <Root>
- <Forms>
- <Form>
<Color>#dcdcdc</Color>
<Login>yes</Login>
<Profile>yes</Profile>
<LoginID>akatikan</LoginID>
<TemplateName>AltA products_submissions2.htm</TemplateName>
<ChannelID>2</ChannelID>
<HTMLEmailID>124</HTMLEmailID>
<FolderID>124</FolderID>
<FolderName>AltASubmissions</FolderName>
<FolderPath>..\Emails\AltASubmissions\AltA products_submissions2.htm</FolderPath>
<ModifyEmails>htmlemails/htmlemail.aspx?FolderID=124</ModifyEmails>
<CurrentPage>1</CurrentPage>
</Form>
- <Form>
<Color>#f5f5f5</Color>
<Login>yes</Login>
<Profile>yes</Profile>
<LoginID>akatikan</LoginID>
<TemplateName>050317_ira_notification_email.htm</TemplateName>
<ChannelID>2</ChannelID>
<HTMLEmailID>120</HTMLEmailID>
<FolderID>120</FolderID>
<FolderName>erq2Test1</FolderName>
<FolderPath>..\Emails\erq2Test1\050317_ira_notific ation_email.htm</FolderPath>
<ModifyEmails>htmlemails/htmlemail.aspx?FolderID=120</ModifyEmails>
<CurrentPage>1</CurrentPage>
</Form>
- <Form>
<Color>#dcdcdc</Color>
<Login>yes</Login>
<Profile>yes</Profile>
<LoginID>akatikan</LoginID>
<TemplateName>050317_ira_notification_email.htm</TemplateName>
<ChannelID>2</ChannelID>
<HTMLEmailID>125</HTMLEmailID>
<FolderID>125</FolderID>
<FolderName>NewTestForMe</FolderName>
<FolderPath>..\Emails\NewTestForMe\050317_ira_noti fication_email.htm</FolderPath>
<ModifyEmails>htmlemails/htmlemail.aspx?FolderID=125</ModifyEmails>
<CurrentPage>1</CurrentPage>
</Form>
- <Form>
<Color>#f5f5f5</Color>
<Login>yes</Login>
<Profile>yes</Profile>
<LoginID>akatikan</LoginID>
<TemplateName>AltA products_submissions2.htm</TemplateName>
<ChannelID>2</ChannelID>
<HTMLEmailID>77</HTMLEmailID>
<FolderID>77</FolderID>
<FolderName>test11</FolderName>
<FolderPath>..\Emails\test11\AltA products_submissions2.htm</FolderPath>
<ModifyEmails>htmlemails/htmlemail.aspx?FolderID=77</ModifyEmails>
<CurrentPage>1</CurrentPage>
</Form>
</Forms>
- <Buttons>
<CurrentPage>1</CurrentPage>
</Buttons>
<Records>4</Records>
<CurrentPage>1</CurrentPage>
<NoOfPages>1</NoOfPages>
- <Pages>
<Page>1</Page>
<CurrentPage>1</CurrentPage>
<NoOfPages>1</NoOfPages>
<i>1</i>
<Category>23</Category>
</Pages>
<BeginRecord>1</BeginRecord>
<EndRecord>4</EndRecord>
<Category>23</Category>
</Root>
And here is my xsl file
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="Root">
<SCRIPT LANGUAGE="JavaScript">
function DownLoad() {
var url;
url = location.href;
window.open(url, '640x480', '_popup', 'height=640, width=480, scrollbars, left=10, top=10, screenX=10, screenY=10');
}
function FormSubmit() {
//alert("test");
document.Next.submit();
}
</SCRIPT>
<table border="0" cellpadding="3" cellspacing="0" width="500">
<tr>
<td colspan="3">
<span class="b02">
<xsl:value-of select="Records"/> HTML Emails</span>
</td>
<td align="right">
<span class="b02">
<xsl:for-each select="Pages">
<xsl:choose>
<xsl:when test="$CurrentPage = $i"> <b><a href="cat_list.asp?paging=next&Category={Categ ory}&Next=++Next++&Page={i}&NextRS={(i * 10) - 10}" onclick="FormSubmit();"><xsl:value-of select="Page" /></a></b>
<b></b>
#160;
</xsl:when>
<xsl:otherwise>
<a href="cat_list.asp?paging=next&Category={Categ ory}&Next=++Next++&Page={i}&NextRS={(i * 10) - 10}"><xsl:value-of select="Page" /></a>
#160;
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</span>
</td>
</tr>
<tr>
<td colspan="2" align="left">
<span class="b02">
<xsl:value-of select="BeginRecord"/> of
<xsl:value-of select="EndRecord"/></span>
</td>
<td colspan="2" align="right">
<span class="b02">
<xsl:value-of select="CurrentPage"/> of
<xsl:value-of select="NoOfPages"/> Pages</span>
</td>
</tr>
<tr>
<td colspan="2">
<span class="b03"><br/>
</span>
</td>
</tr>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="500" bgcolor="white">
<tr bgcolor="#7f0000">
<td colspan="6"><span class="bodyhead03">HTML Emails</span></td>
</tr>
<tr bgcolor="#cccccc">
<td width="28"></td>
<td width="300">
<span class="b02">TemplateName </span>
</td>
<!-- <td width="267">
<span class="b02">Version</span>
</td>
<td align="right" width="10">
<a href="#" onclick="window.open('help/help_forms.html', '_popup', 'height=315, width=315, scrollbars, left=10, top=10, screenX=10, screenY=10');return false">
<img src="../images/icons_help.gif" width="12" height="12" hspace="1" border="0"/>
</a>
</td>-->
<td align="right" width="65">
<span class="b02">Options</span>
</td>
</tr>
<xsl:for-each select="Forms">
<xsl:apply-templates select="Form"/>
</xsl:for-each>
<tr align="center">
<td colspan="5">
<form name="Next" method="Get" action="cat_list.asp?paging=next">
<input type="hidden" name="page" value="HTMLEmail" />
<input type="hidden" name="category">
<xsl:attribute name="value">
<xsl:value-of select="Category"/>
</xsl:attribute>
</input>
<xsl:if test="Buttons/Previous">
<input type="submit" value="Previous" name="Next" class="b02" />
<input type="hidden" name="PreviousRS">
<xsl:attribute name="value">
<xsl:value-of select="Buttons/Previous"/>
</xsl:attribute>
</input>
</xsl:if>
<xsl:if test="Buttons/Next">
<input type="submit" value=" Next " name="Next" class="b02"/>
<input type="hidden" name="NextRS">
<xsl:attribute name="value">
<xsl:value-of select="Buttons/Next"/>
</xsl:attribute>
</input>
</xsl:if>
</form>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="Form">
<tr>
<xsl:attribute name="bgcolor">
<xsl:value-of select="Color"/>
</xsl:attribute>
<td width="28">
<img src="../images/icon_small_web.gif" border="0"/>
</td>
<td width="200">
<span class="b03">
<xsl:value-of select="FolderName"/>
</span>
</td>
<!-- <td colspan="2">
<span class="b03">
<xsl:value-of select="Desc"/>
</span>
</td> -->
<td align="right" width="65">
<a><xsl:attribute name="href"><xsl:value-of select="FolderPath"/></xsl:attribute><xsl:attribute name="Target">New</xsl:attribute><img src="../images/icons_option_preview.gif" border="0"/></a>
<a>
<xsl:attribute name="href">
<xsl:value-of select="ModifyEmails"/>
</xsl:attribute>
<img src="../images/icons_option_modify.gif" border="0"/>
</a>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
|