Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 21, 2012 04:15 PM by ramiramilu
Feb 21, 2012 03:31 PM|LINK
The code is called by using "OnClientClick" in the button element:
<asp:Button ID="submitbutton" runat="server" Text="Submit" OnClientClick="hideDiv();" />
When I click the submit button nothing happens. There is no compile errors, is there something I am missing here??
Feb 21, 2012 03:35 PM|LINK
I think you just need to put double-quotes areound contact-area like document.getElementbyId("contact-area").style.visible="hidden";
Feb 21, 2012 03:37 PM|LINK
rather you should hide it in button click server event.... like this
content-area.Visible = false;
if it is not posting back on button click, then u can hide div on client side.... but the function should be changed as
and the button tag should look like
<asp:Button ID="submitbutton" runat="server" Text="Submit" OnClientClick="return hideDiv();" />
hope this helps...
Feb 21, 2012 03:39 PM|LINK
Nope, doesn't work either, Ive already tried double and single quotes. No luck though.
Feb 21, 2012 03:45 PM|LINK
Feb 21, 2012 03:49 PM|LINK
< content-area.Visible = false; > but it does not recognise "content-area", i get 2 errors:
The name "contact" does not exist in the current context
The name "area" does not exist in the current context
Feb 21, 2012 03:53 PM|LINK
That stops the postback, but the div still isnt hiding.
Feb 21, 2012 03:55 PM|LINK
Feb 21, 2012 04:09 PM|LINK
chang u r div id=contactarea
try this way