Solved

Hide text and listbox

Posted on 2014-03-27
4
151 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 42

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now