By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,805 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Button won't fire after show/hide div

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.