473,320 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

referencing a panel control from javascript

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.
Nov 18 '05 #1
1 1414
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.
"Dune" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
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.


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Will | last post by:
Hi all. I'm learning VB.Net and am developing a WinForms app. I'm trying to make an app that I will use to scan in one or more than on image. I want to use a tabbed interface to hold each image....
2
by: Lokhan Wong | last post by:
My question is whether it's possible to change the properties of a panel, that resides on the webform containing the usercontrol, in the usercontrol itself. Like this: <form> <asp:panel...
1
by: John | last post by:
I have a panel on a webpage. I use client Javacript to manipulate its visibility using something like: Panel.style.display = 'none'. During a postback, getting the Visible attribute always...
4
by: James | last post by:
Hello group: I'm trying to hide a panel control in javascript when a print button is clicked. On my web form, I have a button that fires a javascript function called doPrint(). No matter how I...
4
by: Alexandre Soares | last post by:
Hi, If I make a control that derives from panel, how can I persist the state of the controls that are inside the panel when it is not rendered (visible = false)? The reason for this is that...
9
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
4
by: tshad | last post by:
I am trying to hide and show certain parts of my code (which I have no problem doing with DW). In VS 2003, it won't let you use <div runat="server"to section of parts of my code in a table. This...
4
by: =?Utf-8?B?Rmx5Z3V5?= | last post by:
How can I update the html inside of a panel? How can I make this code work <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
2
by: =?Utf-8?B?TUNN?= | last post by:
I have an asp.net page that contains an update panel. Within the update panel, controls get added dynamically. During partial page post backs the controls within the panel will change. I have a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.