Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 19th, 2006, 05:32 AM
Authorized User
 
Join Date: Oct 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to show a button have hidden property ???

Hi all ,
In .NET 2003,I create a button have hidden property as follow:

<td align="center" colSpan="3">
  <div id="HidButton" style="VISIBILITY:hidden" >
     <asp:button id="bnCheckUserNameExist" runat="server" Text="Check available!"CausesValidation="False">
    </asp:button>
  </div>
</td>

When user focus a text box , I catch the event OnFocus of the text box as follow :

function ShowHidButton()
{
    //alert("Hello");
    document.getElementById("HidButton").style.visibility=visible;
}

I want to show Hidden button above .
But it doesn't work !!!.
Help me !
Thanks you very much !
 
Old November 19th, 2006, 06:45 AM
Authorized User
 
Join Date: May 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this:

For Showing:
function ShowHidButton()
{
    document.getElementById("HidButton").style.display = 'block';
}

For Hiding:
function HideHidButton()
{
    document.getElementById("HidButton").style.display = 'none';
}

Hope this'd work for u


Regards,
Rashida
www.akaas.net
 
Old November 19th, 2006, 09:39 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Instead of hiding the div, just hide the button.

<asp:button id="bnCheckUserNameExist" runat="server" Text="Check available!"CausesValidation="False" visible=[True|False]>
    </asp:button>

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden VBA module....How can I get it to show? Ben Horne Access 3 May 4th, 2007 06:43 PM
'Hidden' Command Button David Mulvey Word VBA 0 January 9th, 2007 11:21 PM
Show web user control hidden see07 ASP.NET 1.x and 2.0 Application Design 4 February 3rd, 2005 12:09 PM
hidden field to be changed to button? dorothee ASP.NET 1.0 and 1.1 Basics 4 June 11th, 2004 02:51 AM
Page refresh, Back Button unhide hidden division John K. King Javascript 13 April 12th, 2004 03:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.