You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Chandra Sekhar <sv...@lasersoft.co.in> on 2006/07/25 07:15:39 UTC
how to handle onChange event on a input field.
Hi ,
Can any one please tell me the way to handle the OnChange Event on the input fields.On a Change of the value on a field I have to call a JavaScript function inorder to clear all the fields.But this is not working for me.Can you please suggest a way for this.
Rgds,
Chandru.
Re: how to handle onChange event on a input field.
Posted by Chandra Sekhar <sv...@lasersoft.co.in>.
Hi Matthias,
<h:outputText id = "lblclientcode" value="#{msgBundle.lblclientcode}"
styleClass="lbltxt" ></h:outputText>
<h:inputText id = "txtclientcode" value = "#{CtlClienttdsBean.mclientcode}"
styleClass="inputfld" size = "12" maxlength="20"
onkeypress="keyPressEvents(this)" onkeydown="keyDownEevents(this)" onfocus =
"gotFocusEvents(this)" onblur = "blurAction(this)" onchange =
"ClearNonKeyFields()"></h:inputText>
In this my JavaScript function ClearNonKeyFields() is Not firing.Can you
please provide a solution for it.
Regards,
Chandru.
----- Original Message -----
From: "Matthias Wessendorf" <ma...@apache.org>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Tuesday, July 25, 2006 11:04 AM
Subject: Re: how to handle onChange event on a input field.
> you have a form like
>
> <h:form id="foo">
> ...
> <h:inputText id="input" ... />
> </form>
>
> and now you are wondering why nothing happens for getElementById("input");
> ?
>
> The rendered result for the input will be "foo:input".
>
> Try
> a) foo:input
> b) Trinidad form (which is not a naming container)
> c) <t:inputText forceId="true" />
>
> Or what is your issue ?
>
> -Matthias
>
> On 7/24/06, Chandra Sekhar <sv...@lasersoft.co.in> wrote:
>>
>>
>> Hi ,
>>
>> Can any one please tell me the way to handle the OnChange Event on the
>> input fields.On a Change of the value on a field I have to call a
>> JavaScript
>> function inorder to clear all the fields.But this is not working for
>> me.Can
>> you please suggest a way for this.
>>
>> Rgds,
>> Chandru.
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
Re: how to handle onChange event on a input field.
Posted by Matthias Wessendorf <ma...@apache.org>.
you have a form like
<h:form id="foo">
...
<h:inputText id="input" ... />
</form>
and now you are wondering why nothing happens for getElementById("input");
?
The rendered result for the input will be "foo:input".
Try
a) foo:input
b) Trinidad form (which is not a naming container)
c) <t:inputText forceId="true" />
Or what is your issue ?
-Matthias
On 7/24/06, Chandra Sekhar <sv...@lasersoft.co.in> wrote:
>
>
> Hi ,
>
> Can any one please tell me the way to handle the OnChange Event on the
> input fields.On a Change of the value on a field I have to call a JavaScript
> function inorder to clear all the fields.But this is not working for me.Can
> you please suggest a way for this.
>
> Rgds,
> Chandru.
--
Matthias Wessendorf
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com