Solved

IE11 not displaying vb.net page design properly On without compatible mode.

Posted on 2015-01-06
3
450 Views
Last Modified: 2015-01-07
Hi I am using IE11, i have used dynamic tables in vb.net code and i am showing hidden
columns on radio button change. it used to work fine on IE9 but i am having issue on
IE11.If I run code on IE11 with compatible mode then It works well But without
compatible mode,Design is messed up.I am attaching my Dotnet code,Please run on VS2010
and change radio button and see difference on IE11 With Compatible and Without
compatible mode.Please help me asap.
Proj1.zip
0
Comment
Question by:Sudhanshum
3 Comments
 
LVL 35

Assisted Solution

by:Robert Schutt
Robert Schutt earned 250 total points
ID: 40533386
setting style.display to "block" is not the default for table cells. Seems to work a lot better if you just use an empty string:
       function showDisplay() {

           var obj1;
           var obj2;
           var obj3;
           var obj4;
           //Box2
           obj1 = document.getElementById("B2Header");
           obj2 = document.getElementById("B2Header2");
           obj3 = document.getElementById("B2Header1");

           obj1.style.display = "";
           obj2.style.display = "";
           obj3.style.display = "";
           var i;
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("GVal" + i);
               objDep.style.display = "";
           }

           //Box3
           obj1 = document.getElementById("B3Header");
           obj2 = document.getElementById("B3Header2");
           obj3 = document.getElementById("B3SHeader1");
           obj4 = document.getElementById("B3PHeader1");

           obj1.style.display = "";
           obj2.style.display = "";
           obj3.style.display = "";
           obj4.style.display = "";
           var i;
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("OSVal" + i);
               objDep.style.display = "";
           }
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("OPVal" + i);
               objDep.style.display = "";
           }

           //Box4
           obj1 = document.getElementById("B4Header");
           obj2 = document.getElementById("B4Header2");
           obj3 = document.getElementById("B4SHeader1");
           obj4 = document.getElementById("B4PHeader1");

           obj1.style.display = "";
           obj2.style.display = "";
           obj3.style.display = "";
           obj4.style.display = "";
           var i;
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("WSVal" + i);
               objDep.style.display = "";
           }
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("WPVal" + i);
               objDep.style.display = "";
           }
       

       }

Open in new window

Note: I only changed the javascript, possibly also need to change code behind.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
ID: 40533924
Robert is right about the display property. the default value for the display property for the TD tag is table-cell and setting the display property on any table element will generally destabilize the page and screw up the table layout.  That is one of the reasons that using table for layout was abandoned by most developers a dozen years ago. The rendering is often unpredictable because the CSS parser may set the wrong method for the RenderObject of affected elements.

It is not surpriseing that compatibility mode works okay because older versions of IE did not follow the standards and the Trident rendering engine used by IE uses MS "standards" in compatibility mode instead of the recognized international standards everyone else follows. IE has been upgraded over the last 3 versions to be about 80-85% standards compliant.

Cd&
0
 

Author Closing Comment

by:Sudhanshum
ID: 40535562
It was really helpful.Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses four methods for overlaying images in a container on a web page
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 style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

735 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