473,396 Members | 1,784 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,396 software developers and data experts.

Button won't fire after show/hide div

dje
In the OnClick event on a radioButtonList, I run a javascript to
show/hide the appropriate div along with a submit button, which
displays as expected. The problem is the submit no longer works on the
button. If I quit using the divs, and do a postback on the radiobutton
selection, showing/hiding tables instead, the button is ok and
continues to work. I've tried a variety of controls instead of the
button in a variety of places but it seems I can not do any postback
after I display the div. I'd like to use Javascript for performance
reasons. Anyone know what's up with the javascript and my button?
Nov 18 '05 #1
5 3185
Have you tried panels, I find them very helpful if I understand what you are
trying to accomplish.

Previous posting (search for 'panels'):

Subject: alternative to Panels for show/hiding parts of a page? 9/15/2004
2:32 PM PST

By: darrel In: microsoft.public.dotnet.framework.aspnet

Was this post helpful to you?
I really like using Panels in ASP.net to show hide parts of a page. The only
catch is that, by default, panels are rendered as DIVs. There are times when
I'd like the panels rendered as Spans...so that they can be used as inline
content.

I can set the display: inline style programatically, or I can create a new
CSS style for this panel and set the 'display: inline' style there, but I'm
wondering if there's a more direct workaround that I could place directly in
the asp:Panel tags do it's not dependant on external styling.

-Darrel

"dje" wrote:
In the OnClick event on a radioButtonList, I run a javascript to
show/hide the appropriate div along with a submit button, which
displays as expected. The problem is the submit no longer works on the
button. If I quit using the divs, and do a postback on the radiobutton
selection, showing/hiding tables instead, the button is ok and
continues to work. I've tried a variety of controls instead of the
button in a variety of places but it seems I can not do any postback
after I display the div. I'd like to use Javascript for performance
reasons. Anyone know what's up with the javascript and my button?

Nov 18 '05 #2
dje
Thanks Chris. I rewrote the entire page (using the javascript and divs
on the click event for the radio button list) and it worked fine. It
seems like once you get a .net project under source control, it is
very fussy about having the page renamed.
-D

"Chris" <Ch***@discussions.microsoft.com> wrote in message news:<D8**********************************@microso ft.com>...
Have you tried panels, I find them very helpful if I understand what you are
trying to accomplish.

Previous posting (search for 'panels'):

Subject: alternative to Panels for show/hiding parts of a page? 9/15/2004
2:32 PM PST

By: darrel In: microsoft.public.dotnet.framework.aspnet

Was this post helpful to you?
I really like using Panels in ASP.net to show hide parts of a page. The only
catch is that, by default, panels are rendered as DIVs. There are times when
I'd like the panels rendered as Spans...so that they can be used as inline
content.

I can set the display: inline style programatically, or I can create a new
CSS style for this panel and set the 'display: inline' style there, but I'm
wondering if there's a more direct workaround that I could place directly in
the asp:Panel tags do it's not dependant on external styling.

-Darrel

"dje" wrote:
In the OnClick event on a radioButtonList, I run a javascript to
show/hide the appropriate div along with a submit button, which
displays as expected. The problem is the submit no longer works on the
button. If I quit using the divs, and do a postback on the radiobutton
selection, showing/hiding tables instead, the button is ok and
continues to work. I've tried a variety of controls instead of the
button in a variety of places but it seems I can not do any postback
after I display the div. I'd like to use Javascript for performance
reasons. Anyone know what's up with the javascript and my button?

Nov 18 '05 #3
great! you might want to check out panel use to really take advantage of it
as a control. I found it helpful to "hide" it on page load via the code
behind and then control it based on user controls. Enjoy!

Protected WithEvents partnering As Panel

'hide convergance panel
partnering.Visible = False

on aspx page:
<asp:panel id="partnering" Runat="Server">
</asp:panel>

"dje" wrote:
Thanks Chris. I rewrote the entire page (using the javascript and divs
on the click event for the radio button list) and it worked fine. It
seems like once you get a .net project under source control, it is
very fussy about having the page renamed.
-D

"Chris" <Ch***@discussions.microsoft.com> wrote in message news:<D8**********************************@microso ft.com>...
Have you tried panels, I find them very helpful if I understand what you are
trying to accomplish.

Previous posting (search for 'panels'):

Subject: alternative to Panels for show/hiding parts of a page? 9/15/2004
2:32 PM PST

By: darrel In: microsoft.public.dotnet.framework.aspnet

Was this post helpful to you?
I really like using Panels in ASP.net to show hide parts of a page. The only
catch is that, by default, panels are rendered as DIVs. There are times when
I'd like the panels rendered as Spans...so that they can be used as inline
content.

I can set the display: inline style programatically, or I can create a new
CSS style for this panel and set the 'display: inline' style there, but I'm
wondering if there's a more direct workaround that I could place directly in
the asp:Panel tags do it's not dependant on external styling.

-Darrel

"dje" wrote:
In the OnClick event on a radioButtonList, I run a javascript to
show/hide the appropriate div along with a submit button, which
displays as expected. The problem is the submit no longer works on the
button. If I quit using the divs, and do a postback on the radiobutton
selection, showing/hiding tables instead, the button is ok and
continues to work. I've tried a variety of controls instead of the
button in a variety of places but it seems I can not do any postback
after I display the div. I'd like to use Javascript for performance
reasons. Anyone know what's up with the javascript and my button?

Nov 18 '05 #4
dje
To correct my earlier post:

The problem turned out to be the required field validators that were
in the divs. While these validators weren't visible, they were firing
and preventing the postback. Someone give me a gun!
-D

de@networld.com (dje) wrote in message news:<d7**************************@posting.google. com>...
Thanks Chris. I rewrote the entire page (using the javascript and divs
on the click event for the radio button list) and it worked fine. It
seems like once you get a .net project under source control, it is
very fussy about having the page renamed.
-D

Nov 18 '05 #5
not sure what "give me a gun" means but panels won't fire validators either.
But to each their own. enjoy.

"dje" wrote:
To correct my earlier post:

The problem turned out to be the required field validators that were
in the divs. While these validators weren't visible, they were firing
and preventing the postback. Someone give me a gun!
-D

de@networld.com (dje) wrote in message news:<d7**************************@posting.google. com>...
Thanks Chris. I rewrote the entire page (using the javascript and divs
on the click event for the radio button list) and it worked fine. It
seems like once you get a .net project under source control, it is
very fussy about having the page renamed.
-D

Nov 18 '05 #6

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

Similar topics

10
by: Steve | last post by:
Hi- I had this nice little wizard application running. It was comprised of several Panel controls initially set w/ their visibility off except for the first one, then as you progress through...
14
by: Steve Chatham | last post by:
I have a combo box that gets populated with a group of items based on a sql table. I had in mind that I'd insert a value at the beginning of that combo box, that'd say "No Item Selected" and...
1
by: microsoft | last post by:
I am looking for code for a button on a website, and I want it to prevent users from clicking more than once while their request is being processed. I would like it to disable or hide the button...
2
by: Sam Miller | last post by:
Hi, I have a button event that won't fire. I left it on Friday and it worked fine. I came back in on Monday and it won't fire. I tried putting another button and just putting a...
4
by: xkeops | last post by:
I'm working in VS2003 VB.NET environment. I created a based class template (BasePage) and there is a new aspx win form (winform1.aspx) inheriting BasePage. In winform1.aspx I have added a new...
2
by: Peted | last post by:
Hi Im using c# express edition 2005 I have an MDI form, where i load multiple child forms from a dll i create, using reflection and late binding The child forms have multiple radio...
3
by: bsm | last post by:
Hi, I have File Upload control in my form. When I click Enter key, it triggers "Submit" button event. So I wrote onkeydown function as follows: if (window.event.keycode == 13) { return...
17
by: govolsbaby | last post by:
Is there a way to leave the button forecolor unchanged when it is disabled? I have multiple buttons on the form and depending on various user inputs, some will or will not be enabled but I'd...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
0
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
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...

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.