referencing a panel control from javascript

  • Thread starter Thread starter Dune
  • Start date Start date
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.
 
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.
 
Back
Top