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

Reg Visibility of tables

I have two tables (t1,t2) and onebutton b1 in my page

For the first time,t2 should be invisible.Afetr clicking b1,t2 should be visible and t1 should be invisible

I wrote code like this

[HTML]<html>
<head>
<script language="javascript">
function enable()
{
document.getElementById('x').style.display='';
}
</script>
</head>
<body>
raju is a good boy
<form method="POST" name="form1" >
<table>
<tr>
<INPUT type="text" name="id">EmpID</input>
<INPUT type="submit" name="button1" value="Edit" onClick="enable()"></input>
</tr>
<table id="x" style="display:none;">
<input type="submit" name="b1" value="result">
</table>
</form>
</body>
</html>[/HTML]


With this code iam able to make t2 invisible and then if iam clicking button b1 t2 is not visible

Please help me
Iam in urgent need of this
Feb 21 '08 #1
1 1027
hsriat
1,654 Expert 1GB
[html]<html>
<head>
<script language="javascript">
function enable(a,b)
{
document.getElementById(a).style.display='';
document.getElementById(b).style.display='none';
}
</script>
</head>
<body>
raju is not a good boy
<form method="POST" name="form1" >
<table id="y">
<tr><td>
<INPUT type="text" name="id">EmpID</input>
<INPUT type="submit" name="button1" value="Edit" onClick="enable('y','x')"></input>
</td></tr></table>
<table id="x" style="display:none;"><tr><td>
<input type="submit" name="b1" value="result" onClick="enable('x','y')">
</td></tr></table>
</form>
</body>
</html>[/html]

Please keep your HTML clean and well formed.
Feb 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jonathan | last post by:
Hi, I've read through quite a number of postings on here so far and have seen what look like very simply, reasonable answers to this question, however I am still completely unable to do what I...
3
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification...
1
by: Holmespundit | last post by:
Stylists... I'm having problems collapsing a column. Specifically, I want to collapse the last column of a table. My initial test with a large data set worked, but I cannot make it work with a...
12
by: lawrence | last post by:
The following function correctly makes everything invisible but then fails to turn the one chosen DIV back to visible. I imagine I'm getting the syntax of the variable wrong? I've tried this with...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
8
by: TTroy | last post by:
I have a few questions about "scope" and "visibility," which seem like two different things. To me "visibility" of the name of a function or object is the actual code that can use it in an...
0
by: Spitz | last post by:
I keep getting the exception An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll (Additional information: Object reference not set to an instance of an...
1
by: Jim Heavey | last post by:
Hello, I create a HTML line as follows: <P class=text12BoldRed id=ErrTimePeriodSelection style="VISIBILITY: hidden" runat="server">Selection of time period either not made or more then one type...
11
by: -D- | last post by:
How can I turn the visibility of the xml control on or off? <%@ Control Language="c#" AutoEventWireup="false" Codebehind="TopNavBar.ascx.cs" Inherits="compass.user_controls.TopNavBar"...
0
by: Rocky | last post by:
Dear ALL, I am facing a bit problem in DATAGRID. so may be you guys can help me out. Actually on a DataGrid I am having following controls: 1) 2 DropDown Menu 2) 1 Text Box 3) 1 ADD Button 4)...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.