Click to See Complete Forum and Search --> : Check if dropdown readonly property is "true"


ISMAILC
01-19-2008, 12:29 PM
Hi, how does when check if a dropdwon readonly value is set to true!
I imported an CSS for my dropdwon but now when user says disable it does not work - i need xslt to check if readonly property has changed the add this code to only that field
var z=dhtmlXComboFromSelect("<xsl:value-of select='$Name' />");
z.disable(true);


The problem is also that the user sets the property after the page is loaded - is this possible - please assist!

[code]
<!-- Drop downs, lookups, etc-->
<xsl:template name="ListValueType">
<xsl:param name="Name" />
<xsl:param name="Attributes" />
<xsl:param name="Options" />
<xsl:param name="Value" />
<xsl:element name="asp:dropdownlist">
<xsl:attribute name='id'>
<xsl:value-of select='$Name' />
</xsl:attribute>
<xsl:attribute name='runat'>server</xsl:attribute>
<xsl:for-each select="$Attributes/Attribute">
<xsl:attribute name='{@name}'>
<xsl:value-of select='.' />
</xsl:attribute>
</xsl:for-each>
<xsl:for-each select='$Value/Options/Option'>
<xsl:element name="asp:ListItem">
<xsl:attribute name='Value'>
<xsl:value-of select='.' />
</xsl:attribute>
<xsl:if test="@selected[. = 'true']">
<xsl:attribute name='selected'>true</xsl:attribute>
</xsl:if>
<xsl:value-of select='.' />
</xsl:element>
</xsl:for-each>
</xsl:element>
<script TYPE='text/javascript'>
var z=dhtmlXComboFromSelect("<xsl:value-of select='$Name' />");
z.disable(true);
</script>
</xsl:template>
[code]

ISMAILC
01-21-2008, 03:34 AM
Hi, Thank You for the help - really appreciate it.

But i have to apologize for the unnecessary post as i just thought of another method instead of struggling to get this going.

I simply just have to check if it has to be disable - then make it not visible & show a text box with it's value!

Thank You

Regards