How to send a variable value from html to XSLT?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wesso
    New Member
    • Jul 2007
    • 3

    How to send a variable value from html to XSLT?

    Hi

    I have a xsl page, that shows 14 barcodes on one page for printing.

    I have created a dropdown list so that you can define how many barcodes you want on a single page.

    I have an xsl variable "barcodeTotalNr" with default value of 14.

    I have a dropdown list "barcodeTotal" which assigns a value to be read into "barcodeTotalNr" by a reloading / submiting the page.

    How can I get xsl variable "barcodeTotalNr" to get the value from the drop down list at sumbit / reload??

    I have the following code:

    Code:
    <script language="JavaScript">
       <! [CDATA [
       Funktionen updateNumberOfBarcode () {
         var barcodeTotal = $ $ ("barcodeForm") barcodeTotal.value.
         document.barcodeForm.submit ();
       }
       ]]>
    </ script>
    <-! Standardværdi for $ barcodeTotalNr = 14 ->
    <xsl:variable name="barcodeTotalNr" select="14" />
    <br/>
    <form id="barcodeForm" name="barcodeForm" action="">
       <-! input type = "hidden" id = "bcTotalNr" name = "bcTotalNr" value = "" / ->
       <span class="csslabel">
       <xsl:value-of select="Update den list"/>
       </ span>
       <select id="barcodeTotal" name="barcodeTotal" class="cssinput" onchange="updateNumberOfBarcode()">
         <option value="2"> 2 </ option>
    <option value="4"> 4 </ option>
    <option value="6"> 6 </ option>
    <option value="8"> 8 </ option>
         <option value="10"> 10 </ option>
    <option value="12"> 12 </ option>
    <option value="14" selected="selected"> 14 </ option>
    <option value="16"> 16 </ option>
       </ select>
       <br/>
    </ form>
    Last edited by Dormilich; May 15 '12, 02:17 PM. Reason: Please use [CODE] [/CODE] tags when posting code.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    How can I get xsl variable "barcodeTotalNr " to get the value from the drop down list at sumbit / reload??
    unless you have a server script that does the XSL transformation that’s afaik not possible, as I am not aware that XSL alone has access to the HTTP data.

    though I don’t see where you use that XSL Variable in your code ...
    Last edited by Dormilich; May 15 '12, 02:29 PM.

    Comment

    Working...