473,508 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading panel visible attribute that was manipulated with Javascript



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 returns true
whether the panel was visible or not. Is there another Javascript method to
turn on/off a Panel's visibility *and* whose attribute can be read from
code behind?
I am thinking of using a hidden field as a flag placeholder which can be
used both in client Javascript and code behind. Is there a better way?

John
Nov 18 '05 #1
1 3594
Hi, John

1. The concept of visible is different between server side
and client side. In server side, if a control's Visible
property is false, it is not rendered to the client.
You might get the display style on server side by:
Panel.Style("display")

2. display style is different from visibility. Unlike
display:none, objects that are not visible still reserve
the same physical space in the content layout as they
would if they were visible.
Panel.style.display = 'none' doesn't mean
Panel.style.visibility = 'hidden'
You might get the visibility style on server side by:
Panel.Style("visibility")
Bin Song, MCP
-----Original Message-----
I have a panel on a webpage. I use client Javacript to manipulate itsvisibility using something like: Panel.style.display = 'none'.
During a postback, getting the Visible attribute always returns truewhether the panel was visible or not. Is there another Javascript method toturn on/off a Panel's visibility *and* whose attribute can be read fromcode behind?
I am thinking of using a hidden field as a flag placeholder which can beused both in client Javascript and code behind. Is there a better way?
John
.

Nov 18 '05 #2

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

Similar topics

4
17015
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...
6
1532
by: sklett | last post by:
I'm curious... asp:Panel renderes a <div> tag, right? And you can have text in a div tag.... so why not have a Text property for the asp:panel control??
4
1776
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...
6
3032
by: wandali | last post by:
Hello, I have a problem in finding the status of a panel (visible or not). I have a dropdownlist that associates with a panel in which textbox are embeded in the panel. A client side VBScript is...
9
3165
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
2330
by: Larry R | last post by:
I am trying to set a panel (that holds a progress image) to be visible when a long running process is happening. Sounds simple, right :) What happens is the panel never becomes visible. The load...
4
6861
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
8381
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.