referencing a panel control from javascript

D

Dune

Saw a post a about hiding a panel using javascript a while
back and that got me curious and i tried it out.

I have a Panel control with id equal to PanelId and it is
nested inside a form tag with id equal to FormId. My
question is why does the line...

document.all("PanelId");

....work ok but the line...

document.FormId.PanelId;

....doesn't work and fails to find the panel control?

I would have thought that because the Panel control is
nested within the form, I can use javascript to refer to
it like any other control inside the form, using this
syntax - "document.FormName.ControlName".

Cheers.
 
K

Ken Cox [Microsoft MVP]

Not sure, but I suspect that the form controls are the specific ones that a
form can use like input, checkbox and submit.

The All collection takes in everything within the whole page, including your
DIV.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top