Solved

Hide text and listbox

Posted on 2014-03-27
4
167 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses

623 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