Hi Dieter,

maybe its the problem in <f:facet name="change">, please try <f:facet
name="click">

regards
David

2007/6/13, Melnizky Dieter <[EMAIL PROTECTED]>:

 I want to toggle the disabled attribute of input fields, depending on the
selected value of a tc:selectBooleanCheckbox.
The idea is to add a JavaScript function that enables the fields, which
should be called when the selectBooleanCheckbox is clicked.
Since the onchange-Attribute is not supported, I tried to use a change
facet with a tc:command, setting the onclick attribute to the function I
wrote:

...
...
<tc:script>

function immediateChanged() {
 var immediate = 
Tobago.element("page:ft_download_parameter:immediateCheckBox").checked
== true;
 // change fields here ...
}
</tc:script>

...
<tc:selectBooleanCheckbox value="#{getData.immediate}"
id="immediateCheckBox" label="#{nbmBundle.ft_labelImmediate}" tip="#{
nbmBundle.ft_tipImmediate}">
 <f:facet name="change">
  <tc:command immediate="false"
onclick="immediateChanged();"></tc:command>
 </f:facet>
</tc:selectBooleanCheckbox>

This is generated, my immediateChanged() function is ignored (the complete
page is submitted to the server):

var element = Tobago.element
("page:ft_download_parameter:immediateCheckBox");
if (element) {
Tobago.addEventListener(element, "change", function(){Tobago.submitAction
('page:ft_download_parameter:_idJsp92')});
}
Does anyone have an idea how I can call my client side JavaScript
function, when the user has clicked the checkbox?

Best regards,
Dieter

The information contained in this e-mail message is privileged and
confidential and is for the exclusive use of the addressee. The person
who receives this message and who is not the addressee, one of his
employees or an agent entitled to hand it over to the addressee, is
informed that he may not use, disclose or reproduce the contents thereof.


Reply via email to