Solved

Hide text and listbox

Posted on 2014-03-27
4
159 Views
Last Modified: 2014-03-27
Hi!

Have this test site: -> http://jsfiddle.net/FNe7d/2/

The problem is that when i select "Varemottak" from listbox1
The two new listboxes is not align at the same line as the 2 other listboxes ?

Why ?
0
Comment
Question by:team2005
4 Comments
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 39958611
It's because you're setting the hidden elements to display:block. You should set them to display: table-row

document.getElementById("sorteringkat").style.display = "table-row";
document.getElementById("kategorier").style.display = "table-row";

Open in new window

0
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 39958613
on row 2 and 3 you have style="display: block" make them equal to line them up.

HTH

Ivo Stoykov
0
 
LVL 82

Expert Comment

by:leakim971
ID: 39958649
replace :
display = "block" by display = "table-row" :

http://jsfiddle.net/FNe7d/4/
window.onload = function() {
   document.getElementById("Rapport").onchange = function() {
        if(this.options[this.selectedIndex].text=="Varemottak") {
             document.getElementById("sorteringkat").style.display = "table-row";
             document.getElementById("kategorier").style.display = "table-row";
        }
        else {
             document.getElementById("sorteringkat").style.display = "none";
             document.getElementById("kategorier").style.display = "none";
        }

   }
}

Open in new window

0
 
LVL 2

Author Closing Comment

by:team2005
ID: 39958991
Thanks
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses four methods for overlaying images in a container on a web page
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question