Hi,
I am working an a web-project using JSF Woodstock 4.3 components and i have a question:
the goal is to disable/enable a textfield on the client-side depending on a checkbox using javascript .
the script code looks like this:
Code:
function xrayCheckboxClicked() {
var cb = document.getElementById(theForm + ":" + 'xrayCheckbox');
(document.getElementById(theForm + ":" + 'xrayPercentageField')).disabled = !cb.getProps().checked;
}
here is another snippet:
Code:
...
<webuijsf:textField
id="xrayPercentageField"
columns="3"
disabled="#{SessionBean1.createProduct_xrayDisabled}"
text="#{createProduct.xrayPercentage}"
/>
...
ok so far - the field gets disabled/enabled when the checkbox is clicked but it does not really work!
1. the text is shifted from left to right inner the field when the field gets disabled.
2. the field is still editable when it is disabled :? !
has anybody experienced this problem?
kind regards,
Christian