473,385 Members | 2,180 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,385 software developers and data experts.

border of table lost when div in cell hidden

Hello here is my html, if you click the missing image in the first
column on the left, the div is shown, when clicked again the div
disappears...but the bottom border disappears as well...Is there anyway
to stop this...???
<HTML>
<HEAD>
<title>Conform Inbox</title>
<meta content="False" name="vs_snapToGrid">
<META http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<script language="javascript" src="Inbox.js"
type="text/javascript"></script>
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("n etscape") > -1)
{
theform = document.forms["Form2"];
}
else {
theform = document.Form2;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
<script language="JavaScript">
function HierarGrid_toggleRow(sender)
{
if(sender == null)
return;

var state = 1;

//if the hidden row has not already been generated, clone the panel
into a new row
var existingRow = window.document.getElementById(sender.id +
"showRow");
if (existingRow==null)
{
//getting a reference to the table
var table = GetParentElementByTagName(sender, "TABLE");
var index = GetParentElementByTagName(sender, "TR").sectionRowIndex
+ 1;
//concatenate name of hidden panel => replace "Icon" from sender.id
with "Panel"\n
rowDivName = HierarGrid_ReplaceStr(sender.id, "Icon", "Panel");
var rowDiv = window.document.getElementById(rowDivName);
//adding new row to table
var newRow = table.insertRow(index);
newRow.id = sender.id + "showRow";
//adding new cell to row
var newTD=document.createElement("TD");
if(table.rows[0].cells[0].colSpan > 1)
newTD.colSpan = table.rows[0].cells[0].colSpan;
else
newTD.colSpan = table.rows[0].cells.length;
var myTD = newRow.appendChild(newTD);
//clone Panel into new cell
var copy = rowDiv.cloneNode(false);
copy.innerHTML = rowDiv.innerHTML;

copy.style.display = "";
myTD.innerHTML = copy.innerHTML;
rowDiv.parentNode.removeChild(rowDiv);

sender.src = HierarGrid_ReplaceStr(sender.src, "plus", "minus");
state = 1;
}
else
{
if (existingRow.style.display=="none")
{
existingRow.style.display = "";
sender.src = HierarGrid_ReplaceStr(sender.src, "plus", "minus");
state = 1;
}
else
{
existingRow.style.display = "none";
sender.src = HierarGrid_ReplaceStr(sender.src, "minus", "plus");
state = 0;
}
}
ChangeRowState(sender, state);
}
function HierarGrid_ReplaceStr(orgString, findString, replString)
{
pos = orgString.lastIndexOf(findString);
return orgString.substr(0, pos) + replString + orgString.substr(pos +
findString.length);
}
function GetParentElementByTagName(element, tagName)
{
var element=element;
while(element.tagName != tagName)
element = element.parentNode;
return element;
}
function ChangeRowState(sender, state)
{
var table = GetParentElementByTagName(sender, "TABLE");
var hiddenfield = table.getAttribute("ExpandedClientIDsName");
var rowStates = document.getElementsByName(hiddenfield)[0].value;

if(state == 1)
{
if(rowStates.indexOf(sender.id) == -1)
rowStates += ", " + sender.id;
}
else if(state == 0)
rowStates = rowStates.replace(sender.id, "");

document.getElementsByName(hiddenfield)[0].value = rowStates;
}
</script>
</HEAD>
<body bottomMargin="0" bgColor="#ffffff" leftMargin="0" topMargin="0"
rightMargin="0" marginwidth="0" marginheight="0">
<form name="Form2" method="post" action="default.aspx" id="Form2"
__smartNavEnabled="true">
<input type="hidden" name="HierarGrid_ExpandedIDs_HG1" value="" />
<div id="folders">
<table cellspacing="0" cellpadding="1" rules="all"
ExpandedClientIDsName="HierarGrid_ExpandedIDs_HG1" bordercolor="Black"
border="1" id="HG1"
style="background-color:White;border-color:Black;border-width:1px;border-style:None;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;width:100%;border-collapse:collapse;">
<tr style="color:White;background-color:#0B6CCE;">
<td>&nbsp;</td>
<td align="Center">Req.<br/>Attn.</td><td align="Center">Mail</td>
<td align="Center"><a
href="javascript:__doPostBack('HG1$_ctl1$_ctl0','' )"
style="color:White;">Name</a></td>
<td align="Center"><a
href="javascript:__doPostBack('HG1$_ctl1$_ctl1','' )"
style="color:White;">Issuer</a></td>
<td align="Center"><a
href="javascript:__doPostBack('HG1$_ctl1$_ctl2','' )"
style="color:White;">Date Issued <img
src="../images/tree/ElementArrowDown.jpg" border="0" /></a></td>
<td align="Center">Info</td>
</tr>
<tr
style="color:Black;background-color:#EEEEEE;border-color:#999999;">
<td>
<img id="HG1__ctl2_Icon"
onClick="javascript:HierarGrid_toggleRow(this);"
src="../../Conform/images/plus.gif" border="0" />
<div id="HG1__ctl2_Panel" class="HierarGrid_Item"
style="display:none">
<div id="HG1__ctl2_Panel_Table1">
<img src="../images/sp.gif" border="0" height="3" />
<table cellspacing="0" cellpadding="1" rules="all"
bordercolor="#999999" border="0"
id="HG1__ctl2_ChildTemplate_Table1_DG1"
style="background-color:White;border-color:#999999;border-width:0px;border-style:None;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:9px;width:100%;border-collapse:separate">
<tr style="color:White;background-color:#4791DA;">
<td
style="color:White;background-color:White;border-color:White;width:14px;">&nbsp;</td>
<td align="Center" style="width:50px;">Status</td>
<td align="Center" style="width:50px;">Doc<br/>Type</td>
<td>Name</td><td style="width:100px;">Revision No.</td>
<td align="Center" style="width:50px;">Doc<br/>Desc</td>
<td align="Center" style="width:50px;">Info</td>
</tr>
<tr style="color:Black;background-color:#EEEEEE;">
<td
style="color:White;background-color:White;border-color:White;width:14px;"></td><td
align="Center" style="width:50px;">
<img src="../images/xclam_sm.gif"/>
</td>
<td align="Center" style="width:50px;">
<img src="../images/check.gif"/>
</td>
<td>
<a id="HG1__ctl2_ChildTemplate_Table1_DG1__ctl2_ViewD oc"
href="javascript:__doPostBack('HG1$_ctl2$ChildTemp late_Table1$DG1$_ctl2$ViewDoc','')">bastard</a>
</td>
<td align="Center" style="width:100px;">1</td>
<td align="Center" style="width:50px;">
<img src="../images/history.gif" alt="Document Description :
asdfdsaffdsRevision Description : asdfdsaffds" />
</td>
<td align="Center" style="width:50px;">
<img src="../images/info.gif" alt="Document Creation Date :
07-12-2004 10:02:13 Revision Creation Date : 07-12-2004 10:02:13" />
</td>
</tr>
<tr style="color:Black;background-color:Gainsboro;">
<td
style="color:White;background-color:White;border-color:White;width:14px;"></td>
<td align="Center" style="width:50px;"><img
src="../images/xclam_sm.gif"/></td>
<td align="Center" style="width:50px;"><img
src="../images/test.gif"/></td>
<td><a id="HG1__ctl2_ChildTemplate_Table1_DG1__ctl3_ViewD oc"
disabled="disabled">capitalsRandom&All</a></td>
<td align="Center" style="width:100px;">1</td>
<td align="Center" style="width:50px;"><img
src="../images/history.gif" alt="Document Description : asdfsadRevision
Description : asdfsad" /></td>
<td align="Center" style="width:50px;"><img
src="../images/info.gif" alt="Document Creation Date : 07-12-2004
12:01:35Revision Creation Date : 07-12-2004 12:01:35" /></td>
</tr>
</table>
<img src="../images/sp.gif" border="0" height="3" />
</div>
</div>
</td>
<td align="Center">
<input name="HG1:_ctl2:distrec" id="HG1__ctl2_distrec" type="hidden"
value="15" /></input>
<asp:Label ID="flash1"><img
src="../images/exclamation_high.gif"/></asp:Label>
</td>
<td align="Center">
<a href='mailto:yu***@yahoo.co.uk'><img src="../images/mail.gif"
border="0" /></a>
</td>
<td align="Center">first1</td>
<td align="Center">ma***********@hiteclabs.co.uk</td>
<td align="Center">07-12-2004 15:34:31</td>
<td align="Center">
<img src="../images/info_blue2.gif" alt='Source : asdf On Behalf Of
: asdf Date Created : 07-12-2004 15:34:22' />
</td>
</tr>
</table>
</div>
<script language="JavaScript">
var HierarGrid_ExpandedIDs_HG1 =
(document.getElementsByName("HierarGrid_ExpandedID s_HG1")[0]).value.split(",
");
for(var index = 0; index < HierarGrid_ExpandedIDs_HG1.length; index++)
{
if(HierarGrid_ExpandedIDs_HG1[index] != null &&
HierarGrid_ExpandedIDs_HG1[index] != "")
HierarGrid_toggleRow(document.getElementsByName(Hi erarGrid_ExpandedIDs_HG1[index])[0]);
}
</script>
</form>
</body>
</HTML>

Jul 23 '05 #1
0 1388

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Rolf Brauser | last post by:
Hi, I want to have a table with a border of 1px arround it but table="1" is more than a pixel because this 3d effect is attached. Values below are not accepted How can I get this border with...
0
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
7
by: jeff | last post by:
Doing this: td{border: 1px solid black} gives me 2px borders on adjacent cells. How do I get the same size border on inside cell walls as outside, much as <table border="1" cellspacing="0">...
3
by: ireneatngs | last post by:
Hi, I have example html below which contains a couple of hidden divs. However, some of the table borders within these hidden divs are actually displayed when they should not be. In my...
7
by: Bob Bedford | last post by:
I've an image in a cell of a table. I've this CSS: ..dbtable{ width: 600px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; border-collapse: collapse; border: 1px solid #000000;
23
by: Bob Bedford | last post by:
I've a table. The table must not have any border. The TR (every line) must have a border, but not the lines between cells. The TR.pages must have no border. so .mytable{border:0px;} ...
2
by: Seth | last post by:
How can I hide an entire row of a table if one of the cells in that row is equal to a value drop down box value. My goal is to have a filtered table so that each cell in each row determines if...
2
by: Jon | last post by:
Hi all, I am trying to create a page that contains a number of div elements, with links on the left side of the page allowing the user to select which div to display. Some of the pages contain...
3
by: effendi | last post by:
Hi Can any tell me what is the javascript equivalent of CSS border? I would like to change the border of my cell when it is set on focus. I have tried onFocus="style.border='3px'" but it is not...
2
by: dschectman | last post by:
This appears to be a feature of IE JavaScript. I am running IE 6.0 with the latest patches from Microsoft. Are there any workarounds other than re-coding the source HTML to place all the...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.