Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2015-01-06
3
Medium Priority
?
485 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 1000 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 1000 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

Independent Software Vendors: 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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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 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.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

773 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