javascript - XSL back button -
i'm not expert in area. did searching didn't find i'm looking for. it's simple.
i'm working on software control system has built-in web server. there points during navigation of system way out use web browsers button (unfortunate, know).
for operators using this, navigation on screen, , presented display has "no way out" cause confusion.
i'd modify layout.xsl
file add button. (if matters, it's ever going internet explorer, system based on activex.)
here relevant parts of file:
<table id="menu" class="header" border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="100%"> <table class="menubar" border="0" cellspacing="0" cellpadding="0"> <tr height="0"> <xsl:for-each select="links/link"> <xsl:if test="text() != 'lists'"> <xsl:if test="text() != 'database'"> <xsl:if test="text() != 'favorites'"> <xsl:if test="text() != 'log off'"> <xsl:if test="text() != 'help'"> <xsl:call-template name="button"> <xsl:with-param name="href" select="@href"/> <xsl:with-param name="text" select="text()"/> <xsl:with-param name="last" select="boolean( position() = count( ../link ) )"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:if> </xsl:if> </xsl:if> </xsl:for-each> <th class="rightbar" align="right" valign="top"/> </tr> </table> </td> </tr> </table> <xsl:template name="button"> <xsl:param name="href"/> <xsl:param name="text"/> <xsl:param name="last"/> <th width="auto" height="20" class="deselected" valign="center"> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="$href"/> </xsl:attribute> <xsl:value-of select="$text"/> </xsl:element> </th> <th width="5" class="deselected" valign="middle"> <img src="/file/images/submenumid.png" width="5" height="20"/> </th> </xsl:template>
you'll see table calls button template several times. if you're confused these lines,
<xsl:if test="text() != 'xxxx'">
those added me filter out existing buttons didn't want displayed.
what i'm hoping have similar template called back button
send command internet explorer. call back button
template first it's left-most item.
thanks in advance, let me know if additional info required!
<xsl:template name="backbutton"> <xsl:param name="last"/> <xsl:call-template name="button"> <xsl:with-param name="href" select="javascript:window.history.back()"/> <xsl:with-param name="text" select="go back"/> <xsl:with-param name="last" select="$last"/> </xsl:call-template> <xsl:template/>
Comments
Post a Comment