*
The moose likes HTML, CSS and JavaScript and the fly likes Collapsible Table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Collapsible Table" Watch "Collapsible Table" New topic
Author

Collapsible Table

Pallavi Srivastava
Ranch Hand

Joined: Dec 22, 2006
Posts: 38
Hi,

I am making a search form in which after entering search criteria, results are displayed on that page only.I have made search criteria collapsible i.e the + sign will disappear the search criteria and -ve sign will make it appear.
The problem is that the search results are not able to jump up to fill the space of search criteria on collapsing the table.Is there anyway to move the results table up as soon as + sign is clicked.

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
In the future it would help to show some code on how you are hiding the data.

Sounds like you are using visibility: hidden|visible when you should be using display: none:block.

Eric
Pallavi Srivastava
Ranch Hand

Joined: Dec 22, 2006
Posts: 38
Hi,

Thanks for reply.Here is the code:

As soon as person clicks on -ve button it calls a javascript function:

function hideSearchBox()
{
var xname = new getObj('LayerName');

if(flag == 0)
{
document.frmsearch.btnhide.value ="+";
xname.style.visibility= 'hidden';
flag = 1;

}
else if(flag == 1)
{
document.frmsearch.btnhide.value= "-";
xname.style.visibility = 'visible';flag = 0;

}

}
What should I do so that the text displayed after this is automatically jump upward?

Thanks again.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
My answer that I posted before still applies, you need to use display.

Eric
Pallavi Srivastava
Ranch Hand

Joined: Dec 22, 2006
Posts: 38
I have used xname.style.display='none and block alternatively but results are same as that of hidden and visible.Its not making the rest of the text to move up
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
This works for me:





Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Collapsible Table
 
Similar Threads
create collapsible/expandable hierarchy
CONTAINS keyword in SQL
Expandable/Collapsible Subtable with h: or t: Datatable
Collapsible Panel?
How to : Collapsible lists in JSP?