5 1276
YAHOO ! Just need to replacing 'block' by ''
Now i search the way to do this without named element..
Can you share the final solution for the benefit of others? Thanks!
Can you share the final solution for the benefit of others? Thanks!
Shure.. the code is: -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
<title>Show/Hide columns for Ciklum CRM</title>
-
<script language="javascript">
-
function show_hide_column(btn,col_no) {
-
btn = document.forms['tcol'].elements[btn];
-
stl = btn.checked ? '' : 'none';
-
var tbl = document.getElementById('table_id');
-
var rows = tbl.getElementsByTagName('tr');
-
-
for (var row=0; row<rows.length;row++) {
-
var cels = rows[row].getElementsByTagName('td');
-
cels[col_no-1].style.display=stl;
-
}
-
}
-
</script>
-
</head>
-
-
<body>
-
<table id="table_id" width="100%" border=1>
-
<tr>
-
<td bgcolor="#666666" class="bold">column 1 text</td>
-
<td bgcolor="#99FF00">column 2 text</td>
-
<td bgcolor="#CC6633" class="italic">column 3 text</td>
-
<td bgcolor="#FFFF33">column 4 text</td>
-
</tr>
-
<tr>
-
<td bgcolor="#666666" class="bold">column 1 text</td>
-
<td bgcolor="#99FF00">column 2 text</td>
-
<td bgcolor="#CC6633" class="italic">column 3 text</td>
-
<td bgcolor="#FFFF33">column 4 text</td>
-
</tr>
-
<tr>
-
<td bgcolor="#666666" class="bold">column 1 text</td>
-
<td bgcolor="#99FF00">column 2 text</td>
-
<td bgcolor="#CC6633" class="italic">column 3 text</td>
-
<td bgcolor="#FFFF33">column 4 text</td>
-
</tr>
-
</table>
-
<p> </p>
-
<p> </p>
-
<form name="tcol" onsubmit="return false">
-
Hide/Show columns
-
<input type=checkbox name="col1" onclick="show_hide_column(this.name,1)" checked> 1
-
<input type=checkbox name="col2" onclick="show_hide_column(this.name,2)" checked> 2
-
<input type=checkbox name="col3" onclick="show_hide_column(this.name,3)" checked> 3
-
<input type=checkbox name="col4" onclick="show_hide_column(this.name,4)" checked> 4
-
</form>
-
</body>
-
</html>
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: adrien |
last post by:
Hi,
(also posted in netscape.public.mozilla.browser)
i use netscape 7 and want to hide the scrollbars of the window when
something happens. I tried this:
window.scrollbars.visible=false...
|
by: FP |
last post by:
I'm new to Java Script.
I'm displaying comments people have made. Below each persons' comment
I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would
display an empty text field...
|
by: bela.patkai |
last post by:
I have a css tabbed text menu (Home - Services - About - Contact) and
would like to show appropriate text formatted in <divblocks on the
webpage when clicking on the menu. Is it possible to do...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |