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 run when the value of
the dropdown change. And here is the script
if document.all(dropdown).value ="-1" then
document.all(panel).style.display = "block"
else
document.all(panel).style.display = "none"
end if
When I do validation at ther server, how do I know if the panel is
visible or not?
Panel.visible is always true, Panel.style("Display") is always = ""
I don't want to make the panel visible from the server side, as the
AutoPostBack is really annoying, but I have to do a lot of validation
at the server, is there any suggestion in my approach or how can I get
around that, am I doing something wrong?
Thanks in advance.
Wanda 6 3021
On Fri, 18 Mar 2005 12:35:29 -0600, <wa*****@rogers.com> wrote: 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 run when the value of the dropdown change. And here is the script
if document.all(dropdown).value ="-1" then document.all(panel).style.display = "block" else document.all(panel).style.display = "none" end if
When I do validation at ther server, how do I know if the panel is visible or not?
Panel.visible is always true, Panel.style("Display") is always = ""
I don't want to make the panel visible from the server side, as the AutoPostBack is really annoying, but I have to do a lot of validation at the server, is there any suggestion in my approach or how can I get around that, am I doing something wrong?
Thanks in advance. Wanda
Try accessing it's style info via the Style property to see if it was
hidden: http://msdn.microsoft.com/library/de...styletopic.asp
The problem is that on the client-side the viewstate string already says
the panel was visible, and that is a 'static' hidden field. So you have
to know it is 'incorrect'....
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
On the server, the display style of the div will not be available. Only
posted form data. However, if you can write a JavaScript function that hides
the div, you can certainly write JavaScript that populates a hidden form
field. ;-)
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
<wa*****@rogers.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... 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 run when the value of the dropdown change. And here is the script
if document.all(dropdown).value ="-1" then document.all(panel).style.display = "block" else document.all(panel).style.display = "none" end if
When I do validation at ther server, how do I know if the panel is visible or not?
Panel.visible is always true, Panel.style("Display") is always = ""
I don't want to make the panel visible from the server side, as the AutoPostBack is really annoying, but I have to do a lot of validation at the server, is there any suggestion in my approach or how can I get around that, am I doing something wrong?
Thanks in advance. Wanda
Is there a way I can retrieve the status (visibility) of a server side
panel? If I do it thru' javascript, how can I get the answer from my
aspnet page (server side)
Thanks
Wanda
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
On Fri, 18 Mar 2005 13:22:44 -0600, Craig Deelsnyder
<cdeelsny@no_spam_4_meyahoo.com> wrote: On Fri, 18 Mar 2005 12:35:29 -0600, <wa*****@rogers.com> wrote:
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 run when the value of the dropdown change. And here is the script
if document.all(dropdown).value ="-1" then document.all(panel).style.display = "block" else document.all(panel).style.display = "none" end if
When I do validation at ther server, how do I know if the panel is visible or not?
Panel.visible is always true, Panel.style("Display") is always = ""
I don't want to make the panel visible from the server side, as the AutoPostBack is really annoying, but I have to do a lot of validation at the server, is there any suggestion in my approach or how can I get around that, am I doing something wrong?
Thanks in advance. Wanda
Try accessing it's style info via the Style property to see if it was hidden:
http://msdn.microsoft.com/library/de...styletopic.asp
The problem is that on the client-side the viewstate string already says the panel was visible, and that is a 'static' hidden field. So you have to know it is 'incorrect'....
Actually, this may have the same problem...Kevin's approach would
definitely work...
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
From the hidden form field!
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Wanda Li" <wa*****@rogers.com> wrote in message
news:en**************@tk2msftngp13.phx.gbl...
Is there a way I can retrieve the status (visibility) of a server side panel? If I do it thru' javascript, how can I get the answer from my aspnet page (server side)
Thanks Wanda
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
Here is what I am working on, I have to check if a textbox is filled or
not. If it is visible, then it must be filled. That's why I need to know
the status (visiblilty) of the panel (in which the textbox embeded in
it). Or is there any workaround?
Thanks
Wanda
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ted Singh |
last post by:
(I apologize in advance if this is an obvious question, my experience is more
with console or client-only apps)
I am trying to build an web-based HTML UI, which will work with a web-server
on...
|
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...
|
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...
|
by: Charlie Dison |
last post by:
Hi There,
Should I be able to show and hide panels in an asp.net page without
requiring a postback? I thought there was a way to do this using java
script. Can anyone give me an example? I...
|
by: BobRoyAce |
last post by:
I am brand new to ASP.NET and am now required to take over maintenance of a
..NET/C# web application. On one of the pages I'm working on there is a
DataGrid which has multiple columns. One of the...
|
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......
|
by: =?Utf-8?B?Sm9zaCBTY2htaWR0?= |
last post by:
I have a gridview that is being used for managing inventory. The default
view shows the stock currently available. When editing I don't want the
stock to be directly edited, rather the user will...
|
by: Sh4wn |
last post by:
Hi,
first, python is one of my fav languages, and i'll definitely keep
developing with it. But, there's 1 one thing what I -really- miss:
data hiding. I know member vars are private when you...
|
by: Doug |
last post by:
Hi I have an img control I am trying to hide upon certain types of
commands in my code behind. When to hide it is directly tied to a
asp:dropdownlist control. So depending on what the user...
|
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...
|
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...
|
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...
|
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...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
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)...
|
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...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |