Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 10th, 2007, 07:33 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default Create properties for javascript link

Hi,

I would like to create properties for a javascript link in XSLT so that i can minipulate the popup window!

in the link onmouseup - i would like to create a property (titlebar) i can use in flowcentric to set the value.


<xsl:template name="BrowsePageNormal">
    <xsl:param name="Name" />
    <xsl:param name="ID" />
    <xsl:param name="Attributes" />
    <xsl:param name="Value" />
    <xsl:param name="ActivityID" />
    <xsl:element name="asp:textbox">
        <xsl:attribute name='id'><xsl:value-of select='$Name' /></xsl:attribute>
        <xsl:attribute name='runat'>server</xsl:attribute>
    <xsl:attribute name='style'>height : 19px; border : 1px solid #CCCCCC;</xsl:attribute>
        <xsl:attribute name='ReadOnly'>True</xsl:attribute>
        <xsl:value-of select='$Value' disable-output-escaping="yes" />
    </xsl:element>
    <xsl:element name="asp:imageButton">
        <xsl:attribute name='id'>bp_<xsl:value-of select='$Name' /></xsl:attribute>
        <xsl:attribute name='runat'>server</xsl:attribute>
        <xsl:attribute name='imageurl'>images/browse.gif</xsl:attribute>
        <xsl:attribute name='alt'>Open Browse Page</xsl:attribute>
  <xsl:attribute name='onMouseUp'>
      window.open('browse2.aspx?o=<xsl:value-of select="$ID" />&amp;a=<xsl:value-of select="$ActivityID" />&amp;g=0&amp;l=0&amp;apb=<xsl:value-of select="$Attributes/Attribute/@name='autopostback'" />','','<xsl:for-each select="$Attributes/Attribute"><xsl:value-of select='@name' />=<xsl:choose><xsl:when test=".='True'">yes</xsl:when><xsl:when test=".='False'">no</xsl:when><xsl:otherwise><xsl:value-of select='.' /></xsl:otherwise></xsl:choose>,</xsl:for-each>status=no,titlebar=no')</xsl:attribute>

  </xsl:element>
</xsl:template>

Regards,

 
Old December 10th, 2007, 08:09 AM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

You can add a <script> in your XSLT which can hold your Javascript functions. Then use a <xsl:choose> to assign the attribute "onMouseUp" event and add the function Javascript command



 
Old December 10th, 2007, 08:09 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Couple of points:

* You don't list any of your input XML so we can't tell if the existing XSLT is likely to work.
* You don't actually say what the problem is - I'm assuming the XSLT you are listing doesn't work, but seeing as you don't list what it it outputing this is hard to determine.

Sam

/- Sam Judson : Wrox Technical Editor -/
 
Old December 10th, 2007, 09:41 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I'm only figuring out as i go along, i'm not to sure how to attach the entire file!



Thanks for the response






Similar Threads
Thread Thread Starter Forum Replies Last Post
create a moving link/image panuvin Javascript How-To 1 October 26th, 2007 07:09 AM
Create link in Outlook talktorajeev C# 1 March 21st, 2006 11:53 AM
Problems with the Data Link Properties Dialog Box macupryk VS.NET 2002/2003 0 September 23rd, 2005 07:05 PM
getURL with javascript window.open properties nancy Flash (all versions) 9 June 4th, 2005 07:52 AM
Create a link in DreamWeaver MX 2004 phudong3da Dreamweaver (all versions) 7 March 23rd, 2005 06:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.