Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JavaScript + XSL

    if i have a function like
    function blabla(ID){
    document.Form.SelectBoxName.value = "]]><xsl:apply-templates select="ITEM"/><![CDATA[";
    }

    and then i have:
    <xsl:template match="ITEM">
    <xsl:if test="ID ='IDFROM JavaScript'">
    <option value="{Email}"><xsl:value-of select="LastName" /></option>
    </xsl:if>
    </xsl:template>

    how can I do that? I know document.Form.SelectBoxName.value is incorrect, i'm just not sure how to do this. Pretty much onclick where blabla(ID) will be called, depending on ID it would insert into Select Box values from XML in ITEM/ where within each ITEM, ID would equal to blabla(IDHERE)
    is this understandable? :/

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Posts
    282
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is this understandable? :/
    no it is not.

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I dot think it is going to work (I would like to see oposite) in a Web Browser environment. If you use Rhino and Xalan it could be possible (?? maybe).

    Web Browser:
    XML -> [builtin XSL Transformmer (XSL templates)] -> HTML doc <-> [builtin JS engine (JS code)]
    rm -f /

  • #4
    New Coder
    Join Date
    Jul 2005
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I decided to do it straight in .asp
    w/o using XSLT page...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •