Solved

Hide text and listbox

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…

777 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