Help! passing xsl variable to a html textbox

Last post 05-09-2008 11:42 AM by NC01. 1 replies.

Sort Posts:

  • Help! passing xsl variable to a html textbox

    05-09-2008, 2:22 AM
    • Loading...
    • Dencio_phil
    • Joined on 04-29-2008, 10:49 AM
    • Posts 2

    Hi there,

    I'm having problem with passing the xsl:variable i declared inside a xslt to an html input text box.

     Here's my code:

    <input id="theTextBox" name="theTextBox" />

    XSLT:

    <xsl:variable name="test" select="test"/>

    <div>

    <a onclick="document.getElementById('theTextBox').value={$test};getValue();" href="Click'>mailto:{$test}@yahoo.com">Click Here</a>

    </div>

    On onclick, I call a javascript function to manipulate the value of textbox. Is this the correct syntax for passing variable???

     Will appreciate your solutions/suggestions...

     Thanks...

     - Dencio

     

  • Re: Help! passing xsl variable to a html textbox

    05-09-2008, 11:42 AM
    • Loading...
    • NC01
    • Joined on 08-26-2005, 7:33 PM
    • Posts 6,867
    • TrustedFriends-MVPs

    I don't see how that could work since the onclick event will fire first. You need to set the TextBox in the function that receives the return value from the href.

    NC...

Page 1 of 1 (2 items)