Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Collapsible Table  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My answer that I posted before still applies, you need to use display.

Eric
 
Pallavi Srivastava
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works for me:





Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!