I have a bunch of forms that have a lot of <input type="text">
fields on them. The user now is requiring that I provide a "read-only" version of every single form. I would recode every field into an
<xsl:choose>
<xsl:when test="/..../permission = 'E'>
<input ....>
</xsl:when>
<xsl:otherwise>
...
</xsl:otherwise>
</xsl:choose>
mess, but I'm hoping for something a little more elegant. A friend suggested
$(function () {
<xsl:if test="/.../permission != 'E'">
$('input').keypress(function() { return false; });
</xsl:if>
});
which does part of what I want, but you can still paste into the fields and you can still delete from them.