Actually, I have set true to the property- Read-Only in Xpage
for a particular field.
And I have tried to change its mode to edit in client side javascript. But I am not able to change.
I used the following code...
document.getElementById("#{id:read}").readOnly=false;
and also
dojo.attr("#{id:read}","readOnly",false);
Both are failed...
(@Trim)
Also in Server side Javascript XSP Code is:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" dojoParseOnLoad="true"
dojoTheme="true">
<xp:this.resources>
<xp:dojoModule name="dijit.Dialog"></xp:dojoModule>
</xp:this.resources>
<div id="dojoTest" dojoType="dijit.Dialog">
<xp:inputText id="field" defaultValue="Hello" readonly="true"></xp:inputText>
<xp:button value="Label" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="field">
<xp:this.action> <![CDATA[{javascript:getComponent("field").setReadonly(false);}]]></xp:this.action>
</xp:eventHandler></xp:button>
<xp:br></xp:br></div>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:button value="Show Popup" id="button2">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[dijit.byId("dojoTest").show();]]> </xp:this.script>
</xp:eventHandler></xp:button>
</xp:view>