how to reference asp controls in javascript ?

  • Thread starter Thread starter Juno
  • Start date Start date
J

Juno

Hi Rea,

You can reference a controls like document.all("'ctrlName'").Usually ,the
ctrlName is the same as the id of that asp control, but in some situation,
it may be changed to control's unique ID.

And at client side, enable property of control does not exists, you should
access disabled property,like document.all.ctrlName.disalbed = false.
 
Hi all
I need to reference web form (server side) controls, inside client side
javascript,
in order to enable some of them according to some condition.
I tried referencing through document.form.ctrlName.enabled = true
but got massage ctrlName is null or not an object??
Same with document.all('ctrlName').

If you have an example of code that works i'll be greatfull.

Thanks for your attention

Rea
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top