how to set value in hiddenfield through inline javscript in xslt RRS feed

  • Question

  • User213108198 posted


     I am trying to change the value of hidden field which is asign from the code behind using javascript in xslt file but value is not changing still its same so what to do and to change that value my

    java script code in xslt form 

    <xsl:attribute name="onclick">
    var z = <xsl:value-of select="./@exclusion_PageSectionID"/>
    var m=document.getElementById('<xsl:value-of select="./@exclusion_PageSectionID" />Exclusion_PageSectionID').value;
    var t=m.split('/');

    document.getElementById('<xsl:value-of select="../@table" />[<xsl:value-of select="../@column" />][]').text=t[0];

    this.parentNode.innerHTML='';return true;

    and i have to null the parent controle that is working fine only hiddenfield value is not changing..

    please help me..


    Tuesday, January 21, 2014 2:05 PM

All replies

  • User361793021 posted


    Code looks fine.

    Are you using Updatepanel?

    Tuesday, January 21, 2014 10:51 PM
  • User213108198 posted

    no m nt using any update panel .its a dynamic page ..

    Wednesday, January 22, 2014 1:51 AM
  • User1908222302 posted


    How about defining variable in xml for example:

    <xsl:variable name="foo" select="'123'"/>

    <input id="foo" type="hidden" value="{$foo} 3456"/>

    Thursday, February 13, 2014 6:13 PM