473,569 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reg Visibility of tables

1 New Member
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="javas cript">
function enable()
{
document.getEle mentById('x').s tyle.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 1036
hsriat
1,654 Recognized Expert Top Contributor
[html]<html>
<head>
<script language="javas cript">
function enable(a,b)
{
document.getEle mentById(a).sty le.display='';
document.getEle mentById(b).sty le.display='non e';
}
</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
2806
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 want to do. I just want to know how I should toggle the visibility of divs in Netscape (I'm using 7). For example, say I have the following HTML...
3
29664
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 says: "The 'visibility' property takes the value 'collapse' for row, row group, column, and column group elements. This value causes the entire row...
1
7540
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 small example. Here are links to the data files (source included below): ...
12
3882
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 both single quotes and no single quotes, but it doesn't work either way. What am I doing wrong? <SCRIPT type='text/javascript'> function...
4
5453
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) { document.getElementById(nameOfDiv).style.visibility='visible'; document.getElementById(nameOfDiv).style.height='auto'; if (nameOfDiv != 'weblogs')
8
3362
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 actual program. To me "scope" of the name of a function or object are the general rules for the areas of a program that can through a declaration, have...
0
1444
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 object.) when I change the visibility of a group box that has bound controls I have 2 tables on SQL, Salutations and Entities. The Salutations...
1
1651
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 (Relative <EM>or</EM> specific time period) was selected</P> I have javascript which performs an edit and turns the visibility on or off
11
2610
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" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> <table cellSpacing="0" cellPadding="0" border="0"> <colgroup span="1" align="left" width="50%">...
0
1223
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) 1 Remove Button So these all controls are in 1 row and looks like:
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.