RE: [xsl] xsl href url in xml

Subject: RE: [xsl] xsl href url in xml
From: "Conal Tuohy" <conalt@xxxxxxxxxxxxxxx>
Date: Sun, 15 Jun 2003 11:23:52 +1200
dsk wrote:

> Thank you very much for responding.
>
> the lines have changed to:
>
> <td>
>         <xsl:for-each select="repdocuments">
>          <table border="1">
>           <tr>
>            <td>
>               <a
> href="javascript:window.open('{docpath}')"><xsl:value-of
> select="docdescrip"/></a>
>            </td>
>           </tr>
>          </table>
>         </xsl:for-each>
>        </td>
>
> this opens a new window, and removes the table from the previous
> window. Is it possible to not open a new window, but display
> what is opened
> in the same browser window? Also, in this case a document
> (like .pdf, .tiff,
> or
> .snp) is displayed. Or if a new window has to be opened, can the table
> remain visible in previous window?

This is an HTML question, nothing to do with XSLT. Consult the HTML
specification at http://www.w3.org/

But please - DON'T use javascript just to open a link! Why not use pure
HTML? HTML is simpler, and doesn't require your users to have javascript
installed and enabled. If you require javascript then anyone with js turned
off will not be able to use your website!

As someone has already pointed out, the correct way to open a link in a new
window could be defined in XSLT like this:

<a href="{docpath}" target="_blank">
	<xsl:value-of select="docdescrip"/> (opens in new window)
</a>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread