473,508 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

javascript to grow divs in table

hi,
I have a table with <trrows which contains <div>, those divs
contains another table, that table contains product information.
Basically it looks like this:

<div style="visibility:hidden;">
<table>
<tr>
<td>Product Name</td>
<td>Price</td>
</tr>
</table>
</div>
This repeats depending on how many products are returned, is there
anyway to hide and display it without the space being there when it's
hidden? overall something like this:
<!-- 1st Order -->
<table>
<tr>
<td>abc</td>
<td>kdfk</td>
</table>
<div style="visibility:hidden;">
<table>
<tr>
<td>Product Name</td>
<td>Price</td>
</tr>
</table>
</div>
<div style="visibility:hidden;">
<table>
<tr>
<td>Product Name</td>
<td>Price</td>
</tr>
</table>
</div>
<!-- 2nd Order -->
<table>
<tr>
<td>abc</td>
<td>kdfk</td>
</table>

I have it so that the div areas hide and show when a link is clicked,
but when hidden there is a large gap inbetween the tables, anyway to
make it so that when it's hidden the gap is reduced and when show it's
grows to make room for it?

Thanks.

Apr 7 '07 #1
1 1161
so******@yahoo.com said the following on 4/6/2007 8:39 PM:
hi,
I have a table with <trrows which contains <div>, those divs
contains another table, that table contains product information.
Basically it looks like this:
<snip>
I have it so that the div areas hide and show when a link is clicked,
but when hidden there is a large gap inbetween the tables, anyway to
make it so that when it's hidden the gap is reduced and when show it's
grows to make room for it?
display:none;

nothing to do with Javascript.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 7 '07 #2

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

Similar topics

0
2196
by: milkyway | last post by:
Hello, Just new to all of this. The code below is supposed to load an XML file for use in a table. It doesn't work because of one command: table.insertRow command: I have seen the specs...
3
4787
by: Chris | last post by:
Hi, I am pretty new to CSS authoring and find myself in a tricky situation. I have a series of divs (dynamically generated - there could be up to 8) as follows: <div class="person">...
5
1760
by: Christopher Boyce | last post by:
I am using the fw_menu.js from John Ahlquist (October 2000). The menu works great, but the problem I am having is with it's speed in IE6. The problem is I am making a menu for each item in a...
11
4961
by: trinitypete | last post by:
Hi all, I have a user control that uses control literal to build a heading with a link, and a div containing links below. As the link heading is hit, I want to change the style of the div,...
1
8703
by: lwhitb1 | last post by:
I have been trying to load a javascript function from the body onload html tag, but I only want the function to load the first time the page is loaded: I have investigated but haven't found...
3
1369
by: Lee | last post by:
Hello all, I have a question about Divs. It is possible to have a Div grow in length in response to a control such as a Table or Gridview growing inside of it? -- Warm Regards, Lee
12
2042
by: shafiqrao | last post by:
Hello everyone, I have a script that runs in IE great, but in firefox it has problems. I understand that there are some objects that are accessed differently in IE and Mozilla. Can anybody let...
11
16890
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got...
4
4247
by: atma86 | last post by:
what up people, i'm writing an app which includes a page that has 2 divs side by side. the page is set up to fill the table containing the divs to 100% of the width of the pages. I want the height...
0
7223
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,...
1
7034
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...
0
7488
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...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5045
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...
0
4702
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...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1544
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 ...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.