Re: Custom Controls & Javascript
- From: "Steve" <Steve@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Jun 2005 11:53:04 -0700
Forgive me for being a 'newbie' with Javascript... but how do I obtain the
ClientID property? Could you possibly provide a short code snipet from what
your explaining? Thank you very much for your help.
"Brock Allen" wrote:
> The ID in the client will be dynamically generated and might be different
> than the exact ID you've assigned in your code. To determine what the ID
> will be in the client browser use the ClientID property on the control in
> the server. You'll have to incorporate that dynamically into your javascript
> when calling getElementById().
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
> > I have created a Custom Control and I need to populate 2 fields with
> > data that I am grabbing from a control on the parent form. I need to
> > use Javascript to grab the data on the parent form & populate the data
> > in the custom control. The code that I have below get's the data but
> > can't find the control on the custom control. Any ideas or proper
> > direction would be appreciated.
> >
> > sFName=document.Form1.fldFName.value;
> > var NameField = document.getElementById(fldQFName);
> > NameField.value = sFName;
> > Thanks!
> >
> > Steve.
> >
>
>
>
>
.
- Follow-Ups:
- Re: Custom Controls & Javascript
- From: Brock Allen
- Re: Custom Controls & Javascript
- References:
- Custom Controls & Javascript
- From: Steve
- Re: Custom Controls & Javascript
- From: Brock Allen
- Custom Controls & Javascript
- Prev by Date: RadioButton in 2 GroupNames?
- Next by Date: Client Side Controls
- Previous by thread: Re: Custom Controls & Javascript
- Next by thread: Re: Custom Controls & Javascript
- Index(es):
Loading